joyce8/EMBER2024-capa huggingface dataset:
Function at 0x431b60
Capabilities:
Get local ipv4 addresses
Get socket information

Disassembly:
sub esp, 0x88
mov eax, dword [0x479060]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x98]
lea eax, [esp + 0xc]
push edi
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x14], 0x80
mov ebp, dword [esi + 0x194]
or edi, 0xffffffff
mov ebx, dword [esi]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x431bc2
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x80
push eax
lea eax, [esp + 0x18]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_accept]
mov edi, eax
push ebp
push esi
call fcn.0041af60
add esp, 8
cmp edi, 0xffffffff
jne 0x431be6
push str.Error_accept__ing_server_connect
push ebx
call fcn.0041a5f0
add esp, 8
mov eax, 0x1e
jmp 0x431c3e
push str.Connection_accepted_from_server_n
push ebx
call fcn.0041a6d0
push 1
mov byte [esi + 0x370], 0
push edi
mov dword [esi + 0x194], edi
call fcn.0043cd00
mov byte [esi + 0x1a1], 1
add esp, 0x10
mov eax, dword [ebx + 0x198]
test eax, eax
je 0x431c3c
push 1
push edi
push dword [ebx + 0x19c]
call eax
add esp, 0xc
test eax, eax
je 0x431c3c
push esi
call fcn.00432100
add esp, 4
mov eax, 0x2a
jmp 0x431c3e
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004465ce
add esp, 0x88
ret
Function at 0x436760
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x479060]
xor eax, esp
mov dword [esp + 0x190], eax
push esi
mov esi, dword [esp + 0x19c]
lea eax, [esp + 4]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x43679e
push eax
push str.WSAStartup_failed___d_
push esi
call fcn.0041a5f0
add esp, 0xc
jmp 0x4367d9
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [esp + 4]
cmp al, 2
jne 0x4367cb
shr eax, 8
test al, al
jne 0x4367cb
xor eax, eax
pop esi
mov ecx, dword [esp + 0x190]
xor ecx, esp
call fcn.004465ce
add esp, 0x194
ret
push str.insufficient_winsock_version_to_support_telnet
push esi
call fcn.0041a5f0
add esp, 8
mov ecx, dword [esp + 0x194]
mov eax, 2
pop esi
xor ecx, esp
call fcn.004465ce
add esp, 0x194
ret

Function at 0x437080
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, dword [esp + 0xc]
push ebx
mov ebx, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
push 0
mov byte [esp + 0x16], al
lea eax, [esp + 0x14]
mov edi, dword [esi]
push 3
push eax
push dword [esi + 0x190]
mov byte [esp + 0x20], 0xff
mov byte [esp + 0x21], bl
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x4370cc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.Sending_data_failed___d_
push edi
call fcn.0041a5f0
add esp, 0xc
push dword [esp + 0x18]
push ebx
push str.SENT
push dword [esi]
call fcn.00436980
add esp, 0x10
pop edi
pop esi
pop ebx
ret
Function at 0x4371b0
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x14
cmp dword [esp + 0x1c], 0x1f
mov eax, dword [esp + 0x18]
push ebx
mov eax, dword [eax]
mov dword [esp + 4], eax
mov ebx, dword [eax + 0x114]
jne 0x437309
push ebp
push edi
lea ebp, [ebx + 0x1cb0]
lea edi, [ebx + 0x1eb0]
mov dword [edi], ebp
cmp ebp, edi
jae 0x4371e9
mov byte [ebp], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4371f4
mov byte [eax], 0xfa
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x4371ff
mov byte [eax], 0x1f
inc dword [edi]
movzx eax, word [ebx + 0x1ca8]
push esi
mov esi, dword [sym.imp.WS2_32.dll_htons]
push eax
call esi
mov word [esp + 0x14], ax
movzx eax, word [ebx + 0x1caa]
push eax
call esi
mov ecx, dword [edi]
mov word [esp + 0x1c], ax
cmp ecx, edi
jae 0x437232
mov al, byte [esp + 0x14]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x437240
mov al, byte [esp + 0x15]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x43724e
mov al, byte [esp + 0x1c]
mov byte [ecx], al
inc dword [edi]
mov ecx, dword [edi]
cmp ecx, edi
jae 0x43725c
mov al, byte [esp + 0x1d]
mov byte [ecx], al
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x437267
mov byte [eax], 0xff
inc dword [edi]
mov eax, dword [edi]
cmp eax, edi
jae 0x437272
mov byte [eax], 0xf0
inc dword [edi]
mov eax, dword [edi]
mov esi, dword [esp + 0x10]
mov dword [ebx + 0x1eb4], eax
sub eax, ebp
sub eax, 2
mov dword [edi], ebp
push eax
lea eax, [ebx + 0x1cb2]
push eax
push 0x3e
push esi
call fcn.00436a90
mov edi, dword [esp + 0x38]
add esp, 0x10
push 0
push 3
push ebp
push dword [edi + 0x190]
call dword [sym.imp.WS2_32.dll_send]
mov ebp, dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jns 0x4372c8
call ebp
push eax
push str.Sending_data_failed___d_
push esi
call fcn.0041a5f0
add esp, 0xc
push 4
lea eax, [ebx + 0x1cb3]
push eax
push edi
call fcn.004370f0
add esp, 0xc
lea eax, [ebx + 0x1cb7]
push 0
push 2
push eax
push dword [edi + 0x190]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jns 0x437306
call ebp
push eax
push str.Sending_data_failed___d_
push esi
call fcn.0041a5f0
add esp, 0xc
pop esi
pop edi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x438220
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x88
mov eax, dword [0x479060]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
push ebp
mov ebp, dword [esp + 0x94]
lea eax, [esp + 8]
push esi
push edi
push eax
mov esi, dword [ebp + 0x5e8]
lea eax, [esp + 0x18]
mov edi, dword [ebp]
push eax
mov dword [esp + 0x18], 0x80
mov eax, dword [esi + 0x154]
push 0
add eax, 4
push eax
push dword [esi + 0x15c]
push dword [esi + 0x14]
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp dword [esi + 0x148], 0
mov dword [esi + 0x14c], eax
jne 0x4382a6
push dword [esp + 0x10]
lea eax, [esp + 0x18]
push eax
lea eax, [esi + 0xc8]
push eax
call fcn.004492a0
mov eax, dword [esp + 0x1c]
add esp, 0xc
mov dword [esi + 0x148], eax
mov edx, dword [esi + 0x14c]
cmp edx, 4
jge 0x4382e1
push str.Received_too_short_packet
push edi
call fcn.0041a5f0
add esp, 8
mov dword [esi + 0xc], 7
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.004465ce
add esp, 0x88
ret
mov eax, dword [esi + 0x15c]
movzx ecx, byte [eax + 1]
movzx eax, byte [eax]
shl eax, 8
or ecx, eax
mov dword [esi + 0xc], ecx
add ecx, 0xfffffffd
cmp ecx, 3
ja case.default.0x438302
jmp dword [ecx*4 + 0x43840c]
cmp edx, 4
jle case.0x438302.4
mov eax, dword [esi + 0x15c]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
movzx eax, word [esi + 0x40]
inc eax
movzx eax, ax
cmp eax, ecx
jne case.0x438302.4
lea eax, [edx - 4]
push eax
mov eax, dword [esi + 0x15c]
add eax, 4
push eax
push 1
push ebp
call fcn.0041a4d0
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x438366
push 5
push esi
call fcn.00438b60
add esp, 8
mov eax, ebx
jmp 0x4382c8
mov eax, dword [esi + 0x14c]
sub eax, 4
cdq
add dword [edi + 0x70], eax
adc dword [edi + 0x74], edx
push dword [edi + 0x74]
push dword [edi + 0x70]
push edi
call fcn.00423580
jmp 0x4383e1
mov eax, dword [esi + 0x15c]
movzx ecx, byte [eax + 2]
movzx eax, byte [eax + 3]
shl ecx, 8
or ecx, eax
mov eax, dword [esi + 0x15c]
add eax, 4
mov dword [esi + 8], ecx
push eax
push 0x465850
push edi
call fcn.0041a6d0
jmp 0x4383e1
lea eax, [edx - 2]
push eax
mov eax, dword [esi + 0x15c]
add eax, 2
push eax
push esi
call fcn.00437fb0
add esp, 0xc
test eax, eax
je case.0x438302.4
jmp 0x4382c8
push str.Internal_error:_Unexpected_packet
push 0x475d40
push edi
call fcn.0041a5f0
add esp, 0xc
push ebp
call fcn.004238f0
add esp, 4
test eax, eax
je 0x4382c6
push 5
push esi
call fcn.00438b60
add esp, 8
mov eax, 0x2a
jmp 0x4382c8
Function at 0x43a530
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x108
mov eax, dword [0x479060]
xor eax, esp
mov dword [esp + 0x104], eax
mov eax, dword [esp + 0x10c]
push eax
call fcn.0045575a
add esp, 4
mov byte [esp], 0
test eax, eax
je 0x43a595
push 0x104
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [esp], 0
je 0x43a595
lea eax, [esp]
push eax
call dword [0x47900c]
add esp, 4
mov ecx, dword [esp + 0x104]
xor ecx, esp
call fcn.004465ce
add esp, 0x108
ret
mov ecx, dword [esp + 0x104]
xor eax, eax
xor ecx, esp
call fcn.004465ce
add esp, 0x108
ret
Function at 0x43dc60
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
mov eax, dword [esi]
cmp dword [eax + 4], 3
jne 0x43dc8b
mov ecx, dword [esi + 0xc]
test ecx, ecx
jne 0x43dc7a
pop edi
xor eax, eax
pop esi
ret
push dword [eax + 8]
push dword [esp + 0x18]
push 1
push dword [esp + 0x1c]
call ecx
jmp 0x43dcc0
cmp dword [esi + 8], 0
jne 0x43dcae
push 0x465ac4
push dword [eax + 8]
call fcn.00450b2a
add esp, 8
mov dword [esi + 8], eax
test eax, eax
jne 0x43dcae
pop edi
or eax, 0xffffffff
pop esi
ret
push dword [esi + 8]
push dword [esp + 0x18]
push 1
push dword [esp + 0x1c]
call fcn.00453732
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x43dce2
mov eax, dword [esi + 8]
test eax, eax
je 0x43dcdc
push eax
call fcn.00450e47
add esp, 4
mov dword [esi + 8], edi
mov eax, dword [esi]
mov eax, dword [eax]
mov dword [esi], eax
mov eax, edi
pop edi
pop esi
ret

Function at 0x4413c0
Capabilities:
Hash data using md4
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x18]
push ebp
push esi
mov esi, ebx
push edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x4413d0
sub esi, ecx
lea ebp, [esi + esi]
push ebp
call dword [section..data]
mov edi, eax
add esp, 4
test edi, edi
jne 0x4413f7
lea eax, [edi + 0x1b]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
xor ecx, ecx
test esi, esi
je 0x441410
nop dword [eax]
mov al, byte [ecx + ebx]
mov byte [edi + ecx*2], al
mov byte [edi + ecx*2 + 1], 0
inc ecx
cmp ecx, esi
jb 0x441400
push 0xf0000000
push 1
push 0
push 0
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
mov esi, dword [esp + 0x28]
test eax, eax
je 0x44148a
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0x8002
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
je 0x44147e
push 0
push ebp
push edi
push dword [esp + 0x1c]
mov dword [esp + 0x28], 0x10
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
push 0
lea eax, [esp + 0x1c]
push eax
push esi
push 2
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
push 0
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov dword [esi + 0x10], 0
push edi
mov byte [esi + 0x14], 0
call dword [0x479004]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x4414b0
Capabilities:
Create new key via cryptacquirecontext
Encrypt data using des via winapi
Encrypt or decrypt via wincrypt

Disassembly:
sub esp, 0x24
mov eax, dword [0x479060]
xor eax, esp
mov dword [esp + 0x20], eax
push esi
mov esi, dword [esp + 0x30]
lea eax, [esp + 4]
push edi
mov edi, dword [esp + 0x38]
push 0xf0000000
push 1
push 0
push 0
push eax
mov dword [esp + 0x20], 8
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x441554
lea eax, [esp + 0x20]
mov dword [esp + 0x24], 0
push eax
xorps xmm0, xmm0
movups xmmword [esp + 0x18], xmm0
push edi
mov word [esp + 0x1c], 0x208
mov dword [esp + 0x20], 0x6601
mov dword [esp + 0x24], 8
call fcn.004415c0
lea eax, [esp + 0x28]
push 8
push eax
call fcn.00444830
add esp, 0x10
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0x14
lea eax, [esp + 0x24]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptImportKey]
test eax, eax
jne 0x441567
push eax
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
xor al, al
pop esi
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.004465ce
add esp, 0x24
ret
mov ecx, dword [esp + 0x30]
push dword [esp + 0xc]
mov eax, dword [ecx]
mov dword [esi], eax
mov eax, dword [ecx + 4]
mov dword [esi + 4], eax
lea eax, [esp + 0x10]
push eax
push esi
push 0
push 0
push 0
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_CryptEncrypt]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push 0
push dword [esp + 0xc]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov ecx, dword [esp + 0x28]
mov al, 1
pop edi
pop esi
xor ecx, esp
call fcn.004465ce
add esp, 0x24
ret
Function at 0x445f20
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push edi
mov ecx, dword [esi + 0xc]
mov eax, dword [esi + 0x14]
lea eax, [eax + ecx*2]
add eax, 0xc
push eax
call dword [section..data]
mov edi, eax
add esp, 4
test edi, edi
jne 0x445f47
pop edi
pop esi
pop ecx
ret
lea ecx, [edi + 0xc]
mov dword [edi], esi
mov dword [edi + 4], ecx
mov eax, dword [esi + 0xc]
add eax, ecx
push ebx
mov ebx, dword [esp + 0x1c]
mov dword [edi + 8], eax
push ebp
cmp ebx, dword [esi + 0x10]
jbe 0x445f8f
mov eax, dword [esi]
push ecx
call eax
mov eax, dword [esi + 4]
push ebx
push dword [esp + 0x24]
push dword [edi + 4]
call eax
mov ebp, dword [edi + 8]
push dword [edi + 4]
add ebp, dword [esi + 0xc]
mov eax, dword [esi + 8]
push ebp
call eax
mov ebx, dword [esi + 0x14]
add esp, 0x18
mov dword [esp + 0x20], ebx
jmp 0x445f93
mov ebp, dword [esp + 0x1c]
push dword [edi + 4]
mov eax, dword [esi]
call eax
push dword [edi + 8]
mov eax, dword [esi]
call eax
mov eax, dword [esp + 0x28]
add esp, 8
xor ebx, ebx
test eax, eax
je 0x445ff5
mov dword [esp + 0x10], eax
mov ebx, eax
movzx eax, byte [ebp]
xor al, 0x36
mov byte [esp + 0x18], al
lea eax, [esp + 0x18]
push 1
push eax
push dword [edi + 4]
mov eax, dword [esi + 4]
call eax
movzx eax, byte [ebp]
lea ebp, [ebp + 1]
xor al, 0x5c
mov byte [esp + 0x24], al
lea eax, [esp + 0x24]
push 1
push eax
push dword [edi + 8]
mov eax, dword [esi + 4]
call eax
add esp, 0x18
sub ebx, 1
jne 0x445fb4
mov ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0x10]
jae 0x446027
nop word [eax + eax]
mov eax, dword [esi + 4]
push 1
push 0x46fc96
push dword [edi + 4]
call eax
mov eax, dword [esi + 4]
push 1
push 0x46fc97
push dword [edi + 8]
call eax
inc ebx
add esp, 0x18
cmp ebx, dword [esi + 0x10]
jb 0x446000
pop ebp
pop ebx
mov eax, edi
pop edi
pop esi
pop ecx
ret

Function at 0x45cae4
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0045c963

Function at 0x45e919
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0045e5d9
Function at 0x4072ad
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x46bc7c], 0
jne 0x4072eb
xor ecx, ecx
push esi
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
movzx edx, dl
neg edx
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x4072c1
mov dword [ecx*4 + 0x46bc78], eax
inc ecx
cmp ecx, 0x100
jl 0x4072bc
pop esi
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
not eax
jbe 0x407318
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
dec dword [ebp + 0x10]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x46bc78]
inc ecx
cmp dword [ebp + 0x10], 0
ja 0x4072f9
not eax
pop ebp
ret 0xc

Function at 0x407ec0
Capabilities:
Encode data using xor

Disassembly:
sub eax, 0x9ec66deb
sub ecx, dword [ebx - 0xbdff43d]
add byte [edx + eax*8 - 9], dl
stc
inc esi
push ecx
ror byte [ebx + 0x4057efa], 0x30
mov byte [esi], al
inc esi
mov eax, ebx
mov ecx, 0xa
cdq
mul dword [edx]
test dword [0x172cca8b], ebx
mov eax, 0x6666432e
neg dword [ebx - 0x7470f43f]
ret 0xe8c1
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x18]
lahf
push ebp
adc al, 0x42
mov eax, dword [ebp + 0x2c]
push 1
mov ecx, dword es:[ebp - 0x1b]
push edx
fnstenv [edi + 8]
push eax
push ecx
push edx
adc dword [esi], ecx
add byte [eax], al
jp 0x407e66
les ebx, [ebx*2 - 0x6f6f6f3d]
nop
nop
nop
nop
mov ah, 0xf0
push ebp
mov ebp, esp
sub esp, 0x14
sbb eax, 0x7c4f107d
pop es
invalid

Function at 0x40a340
Capabilities:
Terminate process

Disassembly:
and al, 0x8b
in al, dx
mov esp, dword [edx]
push es
cmp al, 0x8b
out 4, eax
test eax, eax
jne 0x40a35f
add ecx, 0xc
push ecx
call dword [0xb34d]
xor eax, eax
sub bl, byte [ebp - 0x3e]
add al, 0
sub dword [ebx - 0x74f38afc], 0x41
or byte [eax - 1], dl
adc eax, 0xf13230
jmp 0x40a3e2
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
test dword [ebx - 0x74a9e18b], edi
xor eax, 0x401398
call esi
mov dl, 0xc0
jne 0x40a3fe
pop esi
pop ebp
ret 8
call esi
add eax, 0x6f45fc80
pop esi
pop ebp
ret 8

Function at 0x40acc0
Capabilities:
Encode data using xor

Disassembly:
pop esi
push esi
xor dword [esi], ebx
lodsd eax, dword [esi]
add ebx, eax
test eax, eax
jne 0x40acc2
ret
Function at 0x401010
Capabilities:
Parse pe header

Disassembly:
sub esp, 0x1c
xor eax, eax
cmp word [0x400000], 0x5a4d
mov dword [0x40725c], 1
mov dword [0x407258], 1
mov dword [0x407254], 1
jne 0x401056
mov edx, dword [0x40003c]
cmp dword [edx + 0x400000], 0x4550
lea ecx, [edx + 0x400000]
je 0x4010b0
mov dword [0x40700c], eax
mov eax, dword [0x407268]
test eax, eax
je 0x4010a0
mov dword [esp], 2
call sym.___set_app_type
call sym.___p__fmode
mov edx, dword [0x40727c]
mov dword [eax], edx
call sym.___p__commode
mov edx, dword [0x407264]
mov dword [eax], edx
call dbg._setargv
cmp dword [0x404030], 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], dbg._matherr
call dbg.__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 0x4015ae
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x218
call dbg.__main
mov dword [esp], 0x14
call dbg.sleep
call sym._InitializeRoutine
call sym._SetConfiguration
mov eax, str.USAGE
call eax
mov dword [ebp - 0x218], 0
jmp 0x401607
call sym._SetConfiguration
mov eax, dword [ebp - 0x218]
add eax, 1
mov dword [ebp - 0x218], eax
mov eax, dword [ebp - 0x218]
cmp eax, 4
jle 0x4015f3
lea eax, [ebp - 0x214]
mov ebx, 0x405054
mov edx, 0x7e
mov edi, eax
mov esi, ebx
mov ecx, edx
rep movsd dword es:[edi], dword [esi]
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x1000
mov dword [esp + 4], 0x1f8
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
call eax
sub esp, 0x10
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov edx, eax
lea eax, [ebp - 0x214]
mov ecx, 0x1f8
mov ebx, dword [eax]
mov dword [edx], ebx
mov ebx, dword [eax + ecx - 4]
mov dword [edx + ecx - 4], ebx
lea ebx, [edx + 4]
and ebx, 0xfffffffc
sub edx, ebx
sub eax, edx
add ecx, edx
and ecx, 0xfffffffc
shr ecx, 2
mov edx, ecx
mov edi, ebx
mov esi, eax
mov ecx, edx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [ebp - 0x1c]
call eax
mov eax, 0
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret

Function at 0x401910
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 0x401970
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x407270]
test esi, esi
jle 0x401a90
mov eax, dword [0x407274]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x4019a4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x401a27
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x401990
mov dword [esp], ebx
call dbg.__mingw_GetSectionForAddress
mov edi, eax
test eax, eax
je 0x401ab7
mov eax, dword [0x407274]
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 [0x407274]
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 0x401a97
mov eax, dword [esp + 0x28]
lea edx, [eax - 0x40]
and edx, 0xffffffbf
je 0x401a20
lea edx, [eax - 4]
and edx, 0xfffffffb
jne 0x401a30
add dword [0x407270], 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 [0x407274]
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 0x401a20
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 0x4019ae
mov eax, dword [0x407274]
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 0x401fd0
Capabilities:
Get thread local storage value

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