joyce8/EMBER2024-capa huggingface dataset:
Function at 0x594556
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
mov edx, dword [esp + 0x2c]
push esi
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0xd4]
mov dword [esp + 4], eax
test edx, edx
je 0x59460c
imul eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
imul ecx, dword [esp + 0x28]
push ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
neg eax
add ecx, dword [esp + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x28]
push ebp
push edi
lea edi, [ecx + eax*4]
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 0xcc]
mov ebp, edi
imul ecx, ebx
add ecx, dword [esi + 0xc8]
add ecx, eax
cmp dword [esp + 0x38], 0
jle 0x5945ec
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x10]
mov al, byte [ebp + 2]
xor byte [ecx + 2], al
mov al, byte [ebp + 1]
xor byte [ecx + 1], al
mov al, byte [ebp]
lea ebp, [ebp + 4]
xor byte [ecx], al
add ecx, esi
dec edx
jne 0x5945c7
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
dec edx
inc ebx
cmp dword [esi + 0xe8], 0
mov dword [esp + 0x3c], edx
jne 0x594601
add edi, dword [esp + 0x14]
jmp 0x594605
add edi, dword [esp + 0x24]
test edx, edx
jne 0x5945a5
pop edi
pop ebp
pop ebx
pop esi
pop ecx
pop ecx
ret 0x24

Function at 0x594917
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
push ecx
imul edx, dword [esp + 0x28], 3
push ebx
mov ebx, dword [esp + 0x30]
mov dword [esp + 8], edx
test ebx, ebx
je 0x5949f1
imul eax, dword [esp + 0x1c], 3
mov ecx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x24]
neg ecx
push esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
imul eax, dword [esp + 0x30]
push edi
imul edi, dword [esp + 0x30], 3
mov dword [esp + 0x10], ecx
add eax, dword [esp + 0x20]
add edi, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], edi
mov esi, dword [eax + 0xcc]
imul esi, ebp
mov dword [esp + 0x34], edi
add esi, dword [eax + 0xc8]
add esi, dword [esp + 0x28]
test edx, edx
jle 0x5949c7
mov ebp, dword [esp + 0x34]
mov ebx, 0xff
sub ebx, dword [esp + 0x40]
mov edi, edx
movzx eax, byte [esi]
movzx ecx, byte [ebp]
imul ecx, dword [esp + 0x40]
imul eax, ebx
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
inc ebp
mov byte [esi], al
inc esi
dec edi
jne 0x59498f
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
dec ebx
inc ebp
cmp dword [eax + 0xe8], 0
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x2c], ebp
jne 0x5949de
add edi, ecx
jmp 0x5949e2
add edi, dword [esp + 0x24]
mov dword [esp + 0x38], edi
test ebx, ebx
jne 0x594965
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 0x28
Function at 0x595011
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
push esi
mov esi, dword [esp + 0x30]
push edi
mov edi, dword [esp + 0x14]
mov eax, dword [edi + 0xd4]
mov dword [esp + 8], eax
test esi, esi
je 0x5950c6
imul eax, dword [esp + 0x20]
imul edx, dword [esp + 0x28], 3
push ebx
mov ebx, dword [esp + 0x28]
push ebp
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x24]
neg eax
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x24]
imul eax, dword [esp + 0x34]
add eax, dword [esp + 0x20]
add edx, eax
mov eax, dword [esp + 0x28]
mov ecx, dword [edi + 0xcc]
mov ebp, edx
imul ecx, ebx
add ecx, dword [edi + 0xc8]
add ecx, eax
cmp dword [esp + 0x38], 0
jle 0x5950a7
mov esi, dword [esp + 0x38]
mov edi, dword [esp + 0x10]
mov al, byte [ebp + 2]
xor byte [ecx + 2], al
mov al, byte [ebp + 1]
xor byte [ecx + 1], al
mov al, byte [ebp]
lea ebp, [ebp + 3]
xor byte [ecx], al
add ecx, edi
dec esi
jne 0x595082
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
dec esi
inc ebx
cmp dword [edi + 0xe8], 0
mov dword [esp + 0x3c], esi
jne 0x5950bc
add edx, dword [esp + 0x14]
jmp 0x5950c0
add edx, dword [esp + 0x24]
test esi, esi
jne 0x595060
pop ebp
pop ebx
pop edi
pop esi
pop ecx
pop ecx
ret 0x24
Function at 0x44142d
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x44145b
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x441479
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00441397
jmp 0x441479
mov eax, dword [esi + 0x14]
test eax, eax
je 0x441479
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.00441397
test edi, edi
mov eax, edi
jne 0x441463
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x56b45c]
test ecx, ecx
je 0x44152c
jmp 0x44142c
ret 8

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x405140
Capabilities:
Get file size
Write file on windows

Disassembly:
sub esp, 0x210
mov eax, dword [0x429008]
xor eax, esp
mov dword [esp + 0x20c], eax
push esi
mov esi, ecx
lea eax, [esp + 8]
push edi
cmp word [esi], 0
je 0x40517d
push str.SQLDUMPER_ERRORLOG.log
push esi
push 0x4192c8
push 0x104
push eax
call fcn.00401fd0
add esp, 0x14
jmp 0x4051c5
mov edi, str.SQLDUMPER_ERRORLOG.log
lea ecx, [esp + 0xc]
mov edx, 0x104
sub edi, eax
nop dword [eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x4051ae
movzx eax, word [edi + ecx]
test ax, ax
je 0x4051ae
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x405190
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
test edx, edx
mov word [eax], cx
mov eax, 0x8007007a
cmovne eax, ecx
test eax, eax
js 0x405308
push 0
push 0x80
push 4
push 0
push 3
push 0x40000000
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esi + 0x410], eax
cmp eax, 0xffffffff
jne 0x4052aa
cmp word [esi], 0
mov dword [esi + 0x410], 0
je 0x405253
lea ecx, [esp + 0xc]
mov edi, str.SQLDUMPER_ERRORLOG.log
mov eax, ecx
mov edx, 0x104
sub edi, eax
nop dword [eax + eax]
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x40523e
movzx eax, word [edi + ecx]
test ax, ax
je 0x40523e
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x405220
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
test edx, edx
je 0x405308
push 0
push 0x80
push 4
push 0
push 3
push 0x40000000
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.kernel32.dll_CreateFileW]
mov dword [esi + 0x410], eax
cmp eax, 0xffffffff
jne 0x4052aa
mov dword [esi + 0x410], 0
xor eax, eax
lfence
cmp dword [esi + 0x410], eax
pop edi
setne al
pop esi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.00414600
add esp, 0x210
ret
push 0
lfence
push dword [esi + 0x410]
call dword [sym.imp.kernel32.dll_GetFileSize]
test eax, eax
jne 0x4052e3
push eax
lfence
mov dword [esp + 0xc], eax
lea eax, [esp + 0xc]
push eax
push 2
push 0x418b74
push dword [esi + 0x410]
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x405308
xor eax, eax
lfence
cmp dword [esi + 0x410], eax
pop edi
setne al
pop esi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.00414600
add esp, 0x210
ret
mov ecx, dword [esp + 0x214]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.00414600
add esp, 0x210
ret
Function at 0x405860
Capabilities:
Terminate process

Disassembly:
sub esp, 0xaa8
mov eax, dword [0x429008]
xor eax, esp
mov dword [esp + 0xaa4], eax
push esi
push edi
mov esi, ecx
mov edi, edx
push 0x42e620
lea ecx, [esp + 0xc]
call fcn.00401ee0
call fcn.00404310
mov dl, 1
mov ecx, str.SQLDumper.exe_starting
call fcn.00404350
call 0x404510
test eax, eax
js 0x4058b8
push str.TraceLogging_successfully_initialized.
push 2
push 0x429048
call fcn.00404d90
add esp, 0xc
jmp 0x4058d0
push eax
push str.TraceLogging_initialization_failed_with_return_code:__d.
push 1
push 0x429048
lfence
call fcn.00404d90
add esp, 0x10
push 0x42e640
call dword [sym.imp.kernel32.dll_GetSystemTimeAsFileTime]
mov edx, edi
mov ecx, esi
call fcn.004043d0
call 0x405530
call 0x412220
push dword [esp + 0xab4]
mov ecx, 0x42e620
push edi
push esi
call 0x407170
mov ecx, 0x42e620
call 0x40c910
mov ecx, 0x42e620
call 0x408fc0
mov ecx, 0x429048
call fcn.00404d80
mov ecx, 0x42e620
call fcn.0040a200
mov ecx, 0x42e620
call 0x409780
mov ecx, 0x42e620
call 0x411360
lea ecx, [esp + 8]
call fcn.0040e500
mov ecx, 0x42e620
call 0x411820
mov ecx, 0x42e620
call fcn.00409660
mov ecx, 0x42e620
call fcn.00405520
test eax, 0x2000
je 0x40596f
push 0
jmp 0x405978
test eax, 0x800000
je 0x405982
push 1
mov ecx, 0x42e620
call fcn.0040a470
mov ecx, 0x42e620
call 0x40c8b0
mov ecx, 0x42e620
call fcn.0040d150
mov ecx, 0x42e620
call fcn.00405520
test eax, 0x200
je 0x4059b4
push 0
push 0x3a98
call dword [sym.imp.kernel32.dll_SleepEx]
mov dl, 1
mov ecx, str.SQLDumper.exe_ending
call fcn.00404350
call 0x4044c0
call 0x404540
push dword [0x429040]
call dword [sym.imp.kernel32.dll_ExitProcess]
Function at 0x4080c0
Capabilities:
Check if file exists
Delete file
Enumerate files on windows
Move file
Query or enumerate registry value

Disassembly:
mov eax, 0x1494
call fcn.00415f70
mov eax, dword [0x429008]
xor eax, esp

Function at 0x409900
Capabilities:
Check os version
Query or enumerate registry value

Disassembly:
sub esp, 0x134
mov eax, dword [0x429008]
xor eax, esp
mov dword [esp + 0x130], eax
push ebx
push esi
mov esi, ecx
test dword [esi + 0xe7e4], 0x400
je 0x409a8c
push str.Send_To_Watson_flag_is_set_to_true
push 2
push 0x429048
call fcn.00404d90
add esp, 0xc
test dword [esi + 0xe7e4], 0x4000
je 0x409978
push str.Force_Watson_flag_is_set_to_true
push 2
push 0x429048
call fcn.00404d90
add esp, 0xc
mov eax, 1
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00414600
add esp, 0x134
ret
mov eax, dword [esi + 0xe818]
test eax, eax
je 0x4099f5
push 0x418b34
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x4099f5
push 0x118
push eax
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0x11c
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.kernel32.dll_GetVersionExW]
test eax, eax
je 0x409a8c
cmp dword [esp + 0x24], 2
jne 0x409a8c
cmp dword [esp + 0x18], 6
jb 0x409a8c
mov eax, 1
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00414600
add esp, 0x134
ret
push dword [esi + 0xe7e4]
mov edx, dword [esi + 0xe81c]
mov ecx, dword [esi + 0xe818]
call fcn.00405610
mov esi, eax
test esi, esi
je 0x409a8c
lea eax, [esp + 0xc]
mov dword [esp + 0x10], 0
push eax
lea eax, [esp + 0x14]
mov dword [esp + 0x10], 4
push eax
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0
push eax
push 0
push str.EnableErrorReporting
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
xor ebx, ebx
test eax, eax
setne bl
test eax, eax
jne 0x409a6c
cmp dword [esp + 8], 4
jne 0x409a6c
cmp dword [esp + 0xc], 4
jne 0x409a6c
mov eax, 1
cmp dword [esp + 0x10], eax
cmove ebx, eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.00414600
add esp, 0x134
ret
mov ecx, dword [esp + 0x138]
xor eax, eax
pop esi
pop ebx
xor ecx, esp
call fcn.00414600
add esp, 0x134
ret
Function at 0x40b440
Capabilities:
Enumerate process modules

Disassembly:
sub esp, 0x4d0
mov eax, dword [0x429008]
xor eax, esp
mov dword [esp + 0x4cc], eax
mov eax, dword [esp + 0x4d4]
push ebx
push ebp
push esi
push edi
push 0x190
mov dword [esp + 0x18], eax
mov ebp, edx
lea eax, [esp + 0x34]
mov ebx, ecx
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x10]
push eax
push 0x190
lea eax, [esp + 0x38]
push eax
push ebx
call dword [sym.imp.kernel32.dll_K32EnumProcessModules]
test eax, eax
je 0x40b5c5
mov edi, dword [esp + 0x10]
shr edi, 2
cmp edi, 0x64
jbe 0x40b4ac
mov edi, 0x64
jmp 0x40b4b4
test edi, edi
je 0x40b5e0
xor esi, esi
push 0xc
lea eax, [esp + 0x28]
push eax
push dword [esp + esi*4 + 0x38]
push ebx
call dword [sym.imp.kernel32.dll_K32GetModuleInformation]
test eax, eax
je 0x40b55f
push 0x104
lea eax, [esp + 0x2cc]
push eax
push dword [esp + esi*4 + 0x38]
push ebx
call dword [sym.imp.kernel32.dll_K32GetModuleFileNameExW]
test eax, eax
je 0x40b55f
push 0x104
lea eax, [esp + 0x1c4]
push eax
push dword [esp + esi*4 + 0x38]
push ebx
call dword [sym.imp.kernel32.dll_K32GetModuleBaseNameA]
test eax, eax
je 0x40b55f
lea eax, [esp + 0x1c0]
push ebp
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
jne 0x40b57a
push 1
push eax
lea eax, [esp + 0x2d0]
push eax
call dword [sym.imp.kernel32.dll_LoadLibraryExW]
mov esi, eax
test esi, esi
jne 0x40b585
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
lea eax, [esp + 0x2cc]
push eax
push str.Could_not_load_module__s___d_.
push 1
push 0x429048
call fcn.00404d90
add esp, 0x14
mov eax, esi
jmp 0x40b5e2
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.Could_not_open_module_information_for_remote_process___d_.
push 1
push 0x429048
call fcn.00404d90
add esp, 0x10
inc esi
cmp esi, edi
jl 0x40b4b6
jmp 0x40b5e0
push 0xc
lea eax, [esp + 0x1c]
push eax
push esi
call dword [sym.imp.kernel32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.kernel32.dll_K32GetModuleInformation]
test eax, eax
je 0x40b5b0
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
sub eax, dword [esp + 0x24]
mov dword [ecx], eax
mov eax, esi
jmp 0x40b5e2
push esi
call dword [sym.imp.kernel32.dll_FreeLibrary]
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.Could_not_open_module_information_for_local_image___d_.
jmp 0x40b5d1
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.Could_not_enumerate_process_modules___d_.
push 1
push 0x429048
call fcn.00404d90
add esp, 0x10
xor eax, eax
mov ecx, dword [esp + 0x4dc]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00414600
add esp, 0x4d0
ret 4
Function at 0x40cb80
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x22c
mov eax, dword [0x429008]
xor eax, esp
mov dword [esp + 0x228], eax
push ebx
mov eax, ecx
mov dword [esp + 4], 0
push ebp
mov dword [esp + 0xc], eax
push esi
mov eax, dword [eax + 0x2dec0]
push edi
movzx eax, word [eax + 4]
push eax
push str.Lookup_process_by_port__d
push 2
push 0x429048
call fcn.00404d90
add esp, 0x10
mov ecx, 2
call fcn.0040cad0
mov ecx, 0x17
mov ebx, eax
call fcn.0040cad0
mov ebp, eax
test ebp, ebp
je 0x40cc1f
xor esi, esi
cmp dword [ebp], esi
jbe 0x40cc1f
mov edi, ebp
nop word [eax + eax]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x2dec0]
movzx eax, word [eax + 4]
push eax
call dword [sym.imp.ws2_32.dll_ntohs]
movzx eax, ax
cmp eax, dword [edi + 0x18]
je 0x40cc18
inc esi
add edi, 0x38
cmp esi, dword [ebp]
jb 0x40cbf0
jmp 0x40cc1f
mov eax, dword [edi + 0x38]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10], 0
jne 0x40cc60
test ebx, ebx
je 0x40cc60
xor esi, esi
cmp dword [ebx], esi
jbe 0x40cc60
mov edi, ebx
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 0x2dec0]
movzx eax, word [eax + 4]
push eax
call dword [sym.imp.ws2_32.dll_ntohs]
movzx eax, ax
cmp eax, dword [edi + 0xc]
je 0x40cc59
inc esi
add edi, 0x18
cmp esi, dword [ebx]
jb 0x40cc32
jmp 0x40cc60
mov eax, dword [edi + 0x18]
mov dword [esp + 0x10], eax
push 0x1c
push ebx
call fcn.00415b19
push 0x3c
push ebp
call fcn.00415b19
add esp, 0x10
cmp dword [esp + 0x10], 0
jne 0x40cd2e
push str.Lookup_process_by_uptime_pid
push 2
push 0x429048
call fcn.00404d90
add esp, 0xc
mov dword [esp + 0x18], 0
lea eax, [esp + 0x24]
push 0x20a
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x1c], 0x105
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x1c]
push 0
mov eax, dword [eax + 0x2dec0]
add eax, 0x316
push eax
call dword [sym.imp.instapi160.dll_GetInstRegPathByName]
test eax, eax
je 0x40cd2e
lea eax, [esp + 0x18]
push eax
push 0x20019
push 0
lea eax, [esp + 0x30]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40cd2e
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 4
push eax
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x28]
push eax
push 0
push str.uptime_pid
push dword [esp + 0x2c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [esp + 0x10]
push str.Lookup_process_finished_with_PID_d
push 2
push 0x429048
call fcn.00404d90
mov ecx, dword [esp + 0x248]
add esp, 0x10
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00414600
add esp, 0x22c
ret
Function at 0x40cd70
Capabilities:
Create thread
Inject thread

Disassembly:
mov edx, dword [esp + 8]
lea eax, [esp - 8]
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push ebp
push esi
mov esi, ecx
mov ecx, ebx
push edi
push eax
mov dword [esi], ebx
call fcn.0040b440
mov ebp, eax
test ebp, ebp
je 0x40ce80
push dword [esp + 0x2c]
push ebp
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x40ce65
sub edi, dword [esp + 0x18]
je 0x40ce65
push 4
push 0x3000
push dword [esp + 0x3c]
push 0
push ebx
call dword [sym.imp.kernel32.dll_VirtualAllocEx]
mov dword [esi + 8], eax
test eax, eax
jne 0x40cde4
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.Unable_to_allocate_parameter_block___d_
jmp 0x40ce71
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0
push ecx
push dword [esp + 0x38]
push dword [esp + 0x38]
push eax
push ebx
call dword [sym.imp.kernel32.dll_WriteProcessMemory]
test eax, eax
je 0x40ce57
mov eax, dword [esp + 0x34]
cmp dword [esp + 0x14], eax
jne 0x40ce57
lea eax, [esp + 0x1c]
push eax
push 0
push dword [esi + 8]
push edi
push 0
push 0
push ebx
call dword [sym.imp.kernel32.dll_CreateRemoteThread]
mov dword [esi + 4], eax
test eax, eax
jne 0x40ce3a
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.Unable_to_create_injected_thread___d_
jmp 0x40ce71
push ebp
mov dword [esi + 8], 0
call dword [sym.imp.kernel32.dll_FreeLibrary]
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x14
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.Unable_to_copy_parameter_block___d_
jmp 0x40ce71
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.Unable_to_locate_injected_thread_start_point___d_
push 1
push 0x429048
call fcn.00404d90
add esp, 0x10
mov eax, dword [esi + 4]
test eax, eax
je 0x40ce8e
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [esi + 8]
test eax, eax
je 0x40cec4
push 0x8000
push 0
push eax
push dword [esi]
call dword [sym.imp.kernel32.dll_VirtualFreeEx]
test eax, eax
jne 0x40cec4
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.Unable_to_free_parameter_block__x
push 1
push 0x429048
call fcn.00404d90
add esp, 0x10
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 0x14
Function at 0x40d510
Capabilities:
Enumerate threads
Resume thread
Suspend thread

Disassembly:
sub esp, 0x28
mov eax, dword [0x429008]
xor eax, esp
mov dword [esp + 0x24], eax
push ebx
push ebp
push esi
push edi
push str.GetProcessIdOfThread
push 0x41902c
mov edi, ecx
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
push dword [edi + 0xf30c]
mov dword [esp + 0x14], eax
push 4
call dword [sym.imp.kernel32.dll_CreateToolhelp32Snapshot]
xor ebp, ebp
mov dword [esp + 0x14], eax
mov dword [edi + 0x29c8c], ebp
cmp eax, 0xffffffff
jne 0x40d58e
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.Unable_to_generate_thread_snapshot____d
push 1
push 0x429048
call fcn.00404d90
add esp, 0x10
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x24]
xor ecx, esp
call fcn.00414600
add esp, 0x28
ret 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x18], 0x1c
push ecx
push eax
call dword [sym.imp.kernel32.dll_Thread32First]
test eax, eax
jne 0x40d5bb
lea esi, [eax + 1]
mov edi, str.Unable_to_get_first_thread____d
call dword [sym.imp.kernel32.dll_GetLastError]
mov ebp, eax
jmp 0x40d6ce
mov ebx, dword [esp + 0x3c]
nop
mov eax, dword [esp + 0x24]
cmp eax, dword [edi + 0xf30c]
jne 0x40d66f
push dword [esp + 0x20]
push 0
push 0x42
call dword [sym.imp.kernel32.dll_OpenThread]
mov esi, eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40d608
push esi
mov ecx, eax
call dword [0x4173b4]
mov eax, dword [esp + 0x14]
call eax
cmp eax, dword [edi + 0xf30c]
je 0x40d608
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x40d66f
test esi, esi
je 0x40d66f
test ebx, ebx
je 0x40d63c
cmp ebx, 8
je 0x40d62b
cmp ebx, 0x10
jne 0x40d665
push esi
call dword [sym.imp.kernel32.dll_ResumeThread]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
jmp 0x40d660
push esi
call dword [sym.imp.kernel32.dll_SuspendThread]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
jmp 0x40d660
push esi
call dword [sym.imp.kernel32.dll_SuspendThread]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
je 0x40d660
mov eax, dword [edi + 0x29c8c]
mov dword [edi + eax*4 + 0x29c90], esi
inc dword [edi + 0x29c8c]
cmp ecx, 1
je 0x40d66e
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x40d66f
inc ebp
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x18]
call dword [sym.imp.kernel32.dll_Thread32Next]
test eax, eax
je 0x40d692
cmp dword [edi + 0x29c8c], 0x1000
jb 0x40d5c0
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x12
je 0x40d6c4
cmp dword [edi + 0x29c8c], 0x1000
jae 0x40d6c4
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push str.Unable_to_get_next_thread____d
push 1
push 0x429048
call fcn.00404d90
add esp, 0x10
mov esi, 2
mov edi, str.Threads_processed:__d
push ebp
push edi
push esi
push 0x429048
call fcn.00404d90
add esp, 0x10
push dword [esp + 0x14]
call dword [sym.imp.kernel32.dll_CloseHandle]
mov ecx, dword [esp + 0x34]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00414600
add esp, 0x28
ret 4