WindowsSimProcedure
¤
WindowsSimProcedure
¤
WindowsSimProcedure(verbose=False)
Bases: CustomSimProcedure
Defines methods for applying custom simulation procedures and hooks in a Windows environment.
This class includes methods for setting up the logger, dealing with alternative names, checking for names in angr simprocedures, applying static hooks, and customizing hooks for Windows symbols.
This method sets up the Windows environment for simulation procedures by initializing the logger and configuring the environment for Windows-specific procedures.
Source code in sema_toolchain/sema_scdg/application/procedures/WindowsSimProcedure.py
36 37 38 39 40 41 42 43 44 |
|
amd64_sim_proc_hook
¤
amd64_sim_proc_hook(project, name, sim_proc)
Applies a simulation procedure hook for AMD64 architecture in the project.
This function checks if the project architecture is AMD64 and hooks the specified name with the provided simulation procedure, applying the appropriate calling convention.
Source code in sema_toolchain/sema_scdg/application/procedures/WindowsSimProcedure.py
220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
|
config_logger
¤
config_logger()
Configures the logger if it is not already set.
This function sets up the logger for the Windows simulation procedure, initializing it with the specified log level if it is not already defined.
Source code in sema_toolchain/sema_scdg/application/procedures/WindowsSimProcedure.py
46 47 48 49 50 51 52 53 54 |
|
custom_hook_static
¤
custom_hook_static(proj)
Applies custom static hooks to symbols in the project, handling Windows-specific procedures.
This function customizes hooking for specific Windows symbols, including manual linking, checking for existing angr simulation procedures, and applying appropriate hooks based on the project architecture and symbol names.
Source code in sema_toolchain/sema_scdg/application/procedures/WindowsSimProcedure.py
75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 |
|
custom_hook_windows_symbols
¤
custom_hook_windows_symbols(proj)
Customizes hooking for Windows symbols in the project, handling special cases and excluded names.
This function applies custom procedures to symbols, handles special cases, and excludes specific names when hooking Windows symbols in the project.
Source code in sema_toolchain/sema_scdg/application/procedures/WindowsSimProcedure.py
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
|
deal_with_alt_names
¤
deal_with_alt_names(pkg_name, proc)
Deals with alternative names by updating the simulation procedures dictionary with the alternative name.
This function assigns the alternative name to the procedure and adds
Source code in sema_toolchain/sema_scdg/application/procedures/WindowsSimProcedure.py
56 57 58 59 60 61 62 63 64 65 |
|
handle_custom_package_hooks
¤
handle_custom_package_hooks(proj, symbols_set)
Handles custom package hooks for symbols in the project.
This function iterates through a set of symbols and applies custom procedures from the custom package, handling different cases based on the symbol name and exceptions.
Source code in sema_toolchain/sema_scdg/application/procedures/WindowsSimProcedure.py
179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
|
handle_ordinal
¤
handle_ordinal(proj, symb, lib, name)
Handles ordinal symbols by resolving and applying the appropriate procedures in the project.
This function processes ordinal symbols by extracting the necessary information, determining the real name, and applying the corresponding procedures in the project based on the library and ordinal part.
Source code in sema_toolchain/sema_scdg/application/procedures/WindowsSimProcedure.py
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 |
|
load_syscall_table
¤
load_syscall_table(proj)
Loads the syscall table using the DLL loader in the project.
This function initializes the system call table by loading it from the project using the DLL loader.
Source code in sema_toolchain/sema_scdg/application/procedures/WindowsSimProcedure.py
236 237 238 239 240 241 242 |
|
name_in_angr_simproc
¤
name_in_angr_simproc(name, simproc_names)
Checks if a given name is present in the angr simulation procedures for the specified simulation procedure names.
This function iterates through the provided simulation procedure names to determine if the given name exists in the angr simulation procedures, returning True if found, otherwise False.
Source code in sema_toolchain/sema_scdg/application/procedures/WindowsSimProcedure.py
67 68 69 70 71 72 73 |
|