joyce8/EMBER2024-capa huggingface dataset:
Function at 0x446680
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x487d03
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.0047b6a5
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], method.CBrush.virtual_0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.00480d41
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.0048225d
test eax, eax
je 0x44679c
mov ecx, dword [esp + 0x3c]
call fcn.00480d6e
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x446760
push edi
mov ecx, esi
call fcn.0047e3cc
mov ecx, esi
call fcn.00446940
cmp dword [esp + 0x38], 1
jne 0x446795
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.0047e507
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x4488b0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x4488e3
push esi
call fcn.00456b00
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x4488dc
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x448969
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x448952
mov eax, dword [esi + 8]
test eax, eax
je 0x448907
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x44894e
cmp eax, 2
je 0x448952
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4488fa
cmp eax, 3
je 0x44892d
cmp eax, 1
jne 0x4488fa
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x4488fa
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x4488fa
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00448990
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x448978
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00448990
add esp, 4
pop esi
ret

Function at 0x449200
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x449221
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x449221
mov eax, dword [eax + 0x44]
test eax, eax
je 0x449221
mov edx, dword [esp + 8]
push edx
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x463140
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
push ebp
call sub.RASAPI32.dll_RasHangUpA
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0xa0
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x4631a6
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x10]
push eax
push ebp
call sub.RASAPI32.dll_RasGetConnectStatusA
cmp eax, 6
je 0x4631a6
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x463187
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret

Function at 0x463530
Capabilities:
Create http request

Disassembly:
push esi
mov esi, ecx
cmp dword [esi], 0
jne 0x463568
mov edx, dword [esi + 4]
xor eax, eax
push 0
push 0
mov ecx, dword [edx - 8]
test ecx, ecx
setne al
mov ecx, eax
neg ecx
sbb ecx, ecx
and ecx, edx
neg eax
sbb eax, eax
push ecx
and eax, 2
inc eax
push eax
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.0_
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esi], eax
mov ecx, dword [esi]
xor eax, eax
test ecx, ecx
setne al
pop esi
ret
Function at 0x464240
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x464289
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4

Function at 0x464700
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x488160
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.004642b0
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.00464330
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.00464330
lea ecx, [esi + 0xc]
call fcn.0047a07f
lea ecx, [esi + 0x10]
call fcn.0047a07f
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.004658c0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.004658c0
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.004658c0
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.0047a0f4
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.0047a0f4
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x466c70
Capabilities:
Encrypt data using des

Disassembly:
sub esp, 0xf4
xor ecx, ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x104]
push edi
xor eax, eax
mov al, byte [ecx + str.80_]
mov edx, eax
and eax, 7
sar edx, 3
mov bl, byte [eax*2 + 0x4ad8bc]
mov dl, byte [edx + esi]
test bl, dl
setne al
mov byte [esp + ecx + 0x4c], al
inc ecx
cmp ecx, 0x38
jl 0x466c83
mov eax, 0x1e
xor edx, edx
mov dword [esp + 0x10], eax
cmp dword [esp + 0x10c], 1
je 0x466cc4
lea eax, [edx + edx]
lea edi, [esp + eax*4 + 0x88]
lea ebp, [esp + eax*4 + 0x84]
xor eax, eax
xor ecx, ecx
mov cl, byte [edx + 0x4ad964]
mov dword [edi], 0
mov dword [ebp], 0
mov esi, ecx
cmp ecx, 0x1c
jge 0x466cf6
mov bl, byte [esp + ecx + 0x4c]
jmp 0x466cfa
mov bl, byte [esp + ecx + 0x30]
mov byte [esp + eax + 0x14], bl
inc eax
inc ecx
cmp eax, 0x1c
jl 0x466ceb
mov eax, 0x1c
lea ecx, [esi + 0x1c]
cmp ecx, 0x38
jge 0x466d18
mov bl, byte [esp + ecx + 0x4c]
jmp 0x466d1c
mov bl, byte [esp + ecx + 0x30]
mov byte [esp + eax + 0x14], bl
inc eax
inc ecx
cmp eax, 0x38
jl 0x466d0d
xor ecx, ecx
mov eax, 0x4ad8cc
xor ebx, ebx
mov bl, byte [ecx + 0x4ad974]
cmp byte [esp + ebx + 0x14], 0
je 0x466d47
mov esi, dword [eax]
mov ebx, dword [ebp]
or ebx, esi
mov dword [ebp], ebx
xor ebx, ebx
mov bl, byte [ecx + 0x4ad98c]
cmp byte [esp + ebx + 0x14], 0
je 0x466d5e
mov esi, dword [eax]
mov ebx, dword [edi]
or ebx, esi
mov dword [edi], ebx
add eax, 4
inc ecx
cmp eax, str.80_
jl 0x466d2e
mov eax, dword [esp + 0x10]
inc edx
sub eax, 2
cmp eax, 0xfffffffe
mov dword [esp + 0x10], eax
jg 0x466cb7
lea edx, [esp + 0x84]
push edx
call fcn.00466da0
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xf4
ret
Function at 0x47c49b
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x47c4d3
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0047a54f
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0047a527
jmp 0x47c4df
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x47db89
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x47dbcb
call fcn.00483908
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x47dbcb
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x47dbc2
xor eax, eax
jmp 0x47dbd3
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0047dbd9
pop edi
pop esi
pop ebx
ret 4

Function at 0x483e38
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 0x483e66
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x483e84
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00483d9e
jmp 0x483e84
mov eax, dword [esi + 0x14]
test eax, eax
je 0x483e84
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00483d9e
test edi, edi
mov eax, edi
jne 0x483e6e
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x10002ab0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x10002b11
mov eax, dword [ebp + 0x14]
shl dword [ebp + 0x10], 8
mov ecx, dword [ebp + 8]
push ebx
mov eax, dword [eax]
mov ebx, dword [ebp + 0x1c]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0x18]
push esi
mov cl, byte [ecx]
movsx edx, cl
sub cl, 0x61
cmp cl, 0x19
mov ecx, dword [ebp + 0x10]
lea esi, [edx - 0x20]
cmova esi, edx
mov edx, dword [ebp + 0xc]
add ecx, esi
add eax, ebx
xor eax, dword [edx + ecx*4]
mov ecx, ebx
shl ecx, 5
add ecx, 3
add ecx, esi
add ebx, ecx
mov ecx, dword [ebp + 8]
inc ecx
add ebx, eax
mov dword [ebp + 8], ecx
sub edi, 1
jne 0x10002ad2
pop esi
pop ebx
pop edi
pop ebp
ret 0x18
mov eax, dword [ebp + 0x18]
pop edi
pop ebp
ret 0x18
Function at 0x4010b0
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
jmp 0x4010c2
mov eax, dword [0x40a08b]
shl eax, 2
mov dword [0x40a08f], eax
push edx
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov edx, eax
call fcn.00402674
pop edx
call fcn.00401a10
call fcn.00402678
push 0
call fcn.0040387c
pop ecx
push 0x40a034
push 0
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [0x40a093], eax
push 0
jmp fcn.00407358

Function at 0x402368
Capabilities:
Get memory capacity

Disassembly:
add esp, 0xffffffe0
mov dword [esp], 0x20
push esp
call sub.KERNEL32.DLL_GlobalMemoryStatus
mov eax, dword [esp + 0xc]
add esp, 0x20
ret

Function at 0x4063dc
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
test eax, eax
je 0x40643e
call fcn.0040638c
mov esi, eax
lea eax, [ebp - 4]
push 0
push eax
push esi
call fcn.00402a18
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push edi
call fcn.00402a18
pop ecx
push eax
push edi
push ebx
call sub.KERNEL32.DLL_WriteFile
push ebx
call sub.KERNEL32.DLL_CloseHandle
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret

Function at 0x40649c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff7c
cmp dword [0x40c1dc], 0
push ebx
push esi
mov esi, dword [ebp + 8]
jne 0x406576
cmp dword [0x40c1d8], 0
jne 0x406576
cmp dword [0x40c3cc], 0
je 0x406530
push 0x80
lea eax, [ebp - 0x84]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x5c
lea edx, [ebp - 0x84]
push edx
call fcn.0040628c
add esp, 8
mov ebx, eax
test eax, eax
jne 0x406516
push 0x3a
lea edx, [ebp - 0x84]
push edx
call fcn.0040628c
add esp, 8
mov ebx, eax
test eax, eax
jne 0x406516
lea ebx, [ebp - 0x84]
jmp 0x406517
inc ebx
call fcn.00406458
or eax, 0x10010
push eax
push ebx
push esi
push 0
call sub.USER32.DLL_MessageBoxA
jmp 0x4065b1
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
mov ebx, eax
lea eax, [ebp - 4]
push 0
push eax
push 2
push 0x40c1e0
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push esi
call fcn.00402a18
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea ecx, [ebp - 4]
push ecx
push 2
push 0x40c1e3
push ebx
call sub.KERNEL32.DLL_WriteFile
jmp 0x4065b1
cmp dword [0x40c1d8], 0
je 0x406590
cmp dword [0x40c1d8], 0xffffffff
je 0x4065b1
push esi
call dword [0x40c1d8]
pop ecx
mov eax, dword [0x40c1dc]
test eax, eax
je 0x4065b1
cmp dword [0x40c1dc], 0xffffffff
je 0x4065b1
cmp byte [eax], 0
je 0x4065b1
push esi
push eax
call fcn.004063dc
add esp, 8
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x406840
Capabilities:
Connect socket

Disassembly:
call dword [edi + 0x4dfe33e8]
inc dword [ebx + 0x5d5e042f]
ret 4
push ebp
mov ebp, esp
sub esp, 0x221
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
arpl word [ebx - 0x1e], ax
cmp eax, 0xffffffff
je 0xe64069ef
mov esi, esp
adc byte [ebp - 0x763df060], al
add dword [eax], eax
add cl, cl
jne 0x406875
mov ecx, dword [esi + 0x62]
lea edx, [esi + 0x74]
fst qword [edx + 0x50]
call dword [sym.imp.WSOCK32.dll_connect]
cmp eax, 0xffffffff
ud0
rol dword [eax], 0x83
clc
dec dword [edi]
push dword [edi]
add dword [eax], eax
add byte [ebx - 0x553ea3e3], cl
add bh, bh
salc
pop es
ror byte [edi], 0x84
stc
jne 0x406890
add bh, bh
salc
add eax, 0x231280
cmp eax, 0xb23b3
jbe 0x406824
push ecx
add dword [eax], eax
add bh, ah
jnp 0x4068c6
mov esi, dword [ebx + 0x24]
mov ecx, dword [ebp + 0x7ca6c60b]
pop edi
pop esi
mov eax, 0x8b23b4
pop ebx
mov esp, ebp
pop ebp
ret 8
idiv byte [esi - 0x6e]
hlt

Function at 0x407ef0
Capabilities:
Encode data using xor

Disassembly:
add dl, 0x30
jp 0x407ed7
push ebp
mov ebp, esp
sub esp, 0x26
cmp dword [ebp + 0x10], 0x4f
jl 0x407f03
xchg ecx, eax
inc ebp
adc byte [eax + eax], dl
add byte [eax], al
fld qword [ebp + 8]
fcomp qword [0x4608867]
mov edx, dword [eax + 0x5d8b5303]
and byte [esi + 0x33], dl
not byte [edi - 0x21]
loopne 0x407ea3
jne 0x407f18
mov dword [ecx], esi
test ah, 5
mov edi, ebx
jp 0x407f33
fld qword [ebp + 8]
fchs
pop ebp
or bh, al
add dword [ecx], eax
add byte [ecx], dl
add byte [ebx + 0x558b0c4d], cl
or byte [ebp + 0x3140ec45], cl
add al, 0x9a
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x14]
inc eax
xor dword [edx + ebx*4], eax
adc eax, 0x3440c118
fisttp qword [eax + 0x5f45dd08]
fcomp qword [0x40c25f]
and dword [edx], 0xc
jecxz 0x407f36
mov dl, 0xc4
inc esp
jnp 0x407fcd
mov bl, 0xc1
lea edx, [edx - 0x22a7890d]
inc ebp
in al, dx
fsub st(7), st(0)
xor dl, al
inc eax
add bh, bl
loopne 0x407f64
les eax, [ebx + edi*2 + 0x48]
invalid
fld qword [ebp + 0x7f]
fcomp qword [0x40c230]
invalid

Function at 0x40ae50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov eax, dword [edx]
sub esp, 0xc
xchg esi, eax
push esi
mov esi, dword [ebp + 0x10]
push edi
push eax
pop es
ja 0x40ae72
dec esp
push es
or al, 0
add dword [ecx], edi
pop edi
pop esi
push ecx
pop ss
xor dword [ebx + 0xcc25de5], ecx
add byte [ebx + 0x430d965d], cl
xor dh, 0xc4
mov ebx, dword [ebp - 0x6a]
or eax, 0xc4f68243
add dh, byte [ebp - 0x75]
inc ebx
or al, 0x85
sal byte [ebp + 0x5e], 0x8b
pop esp
push 0x14
push eax
adc al, 0x50
xor edi, edx
call fcn.00404a60
mov ecx, eax
mov edx, edi
mov dword [eax + 4], edi
mov dword [eax + 8], edi
sbb al, 0x9b
lahf
push edi
push edi
push edi
mov dword [eax + 0x10], edi
push edi
mov dword [ebx + 0xc], ecx
call dword [0xb8c0a0]
mov edx, dword [ebx + 0xc]
or al, byte [edx + 0x10]
mov byte [ebx + 0x12], 0x8b
dec eax
adc byte [ebp - 0x74b48aa3], al
xor eax, 0x400698
popal
leave
jp 0x40ae87
jne 0x40aed2
pop edi
hlt
call esi
in eax, dx
add eax, 0xafc80
pop ebx
mov ecx, dword [edi]
pop ebp
ret 0xc
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x49b054], 1
mov dword [0x49b050], 1
mov dword [0x49b04c], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x49b00c], eax
mov eax, dword [0x49b060]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x49b074]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x49b05c]
mov dword [eax], edx
call sym.__setargv
cmp dword [0x455ad4], 1
je 0x4010e0
xor eax, eax
add esp, 0x1c
ret
mov dword [esp], 1
call sym.___set_app_type
jmp 0x401070
movzx edx, word [ecx + 0x18]
cmp dx, 0x10b
je 0x4010f8
cmp dx, 0x20b
jne 0x401056
cmp dword [ecx + 0x84], 0xe
jbe 0x401056
mov edx, dword [ecx + 0xf8]
xor eax, eax
test edx, edx
setne al
jmp 0x401056
mov dword [esp], sym.__matherr
call sym.___mingw_setusermatherr
xor eax, eax
add esp, 0x1c
ret
cmp dword [ecx + 0x74], 0xe
jbe 0x401056
mov ecx, dword [ecx + 0xe8]
xor eax, eax
test ecx, ecx
setne al
jmp 0x401056
Function at 0x405370
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call sym.___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 sym.___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 0x4053d0
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x49b068]
test esi, esi
jle 0x4054f0
mov eax, dword [0x49b06c]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x405404
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x405487
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x4053f0
mov dword [esp], ebx
call sym.___mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x405517
mov eax, dword [0x49b06c]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call sym.__GetPEImageBase
mov edx, dword [0x49b06c]
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 0x4054f7
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x405480
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x405490
add dword [0x49b068], 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 [0x49b06c]
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 0x405480
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call sym.___report_error
lea esi, [esi]
lea esi, [esi]
xor esi, esi
jmp 0x40540e
mov eax, dword [0x49b06c]
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 sym.___report_error
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call sym.___report_error
lea esi, [esi]
nop
Function at 0x405a30
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x49b084
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x49b07c]
sub esp, 4
test ebx, ebx
je 0x405a85
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 0x405a7e
test esi, esi
je 0x405a7e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x405a60
mov dword [esp], 0x49b084
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x405dc0
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x405de5
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x405df0
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x405de5
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 0x405e38
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x405e2e
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x405e3a
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x405e20
xor eax, eax
pop ebx
pop esi
ret
Function at 0x10001fa9
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
mov ebx, dword [ebp + 8]
cmp ebx, 0
je 0x10001fee
mov eax, dword [ebx + 0x3c]
add eax, ebx
mov edx, dword [eax + 0x78]
add edx, ebx
mov ecx, dword [edx + 0x18]
mov eax, dword [edx + 0x20]
push ecx
push ecx
push eax
xor eax, eax
or ecx, 0xffffffff
mov edi, dword [ebp + 0xc]
mov edi, dword [edi]
repne scasb al, byte es:[edi]
not ecx
pop eax
push ecx
mov edi, dword [ebp + 0xc]
mov edi, dword [edi]
mov esi, dword [eax + ebx]
add esi, ebx
repe cmpsb byte [esi], byte es:[edi]
pop ecx
je 0x10001ff4
add eax, 4
pop esi
dec esi
push esi
jne 0x10001fd6
xor eax, eax
leave
ret 8
pop esi
pop ecx
sub ecx, esi
mov eax, dword [edx + 0x24]
lea eax, [eax + ecx*2]
movzx eax, word [eax + ebx]
mov ecx, dword [edx + 0x1c]
lea eax, [ecx + eax*4]
mov eax, dword [eax + ebx]
add eax, ebx
leave
ret 8