joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45b440
Capabilities:
Get common file path

Disassembly:
sub esp, 0x104
mov ecx, 0x41
xor eax, eax
push edi
lea edi, [esp + 4]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 4]
push ecx
mov ecx, dword [esp + 0x110]
call fcn.0045b240
pop edi
add esp, 0x104
ret 4

Function at 0x45bbc0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x14], 0xca
jne 0x45bbf3
push esi
call fcn.004608f0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x45bbec
mov dword [esi + 0x14], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x14], 0xcb
mov eax, dword [esi + 0x14]
cmp eax, 0xcb
jne 0x45bc79
mov eax, dword [esi + 0x1b8]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x45bc62
mov eax, dword [esi + 8]
test eax, eax
je 0x45bc17
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b8]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x45bc5e
cmp eax, 2
je 0x45bc62
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x45bc0a
cmp eax, 3
je 0x45bc3d
cmp eax, 1
jne 0x45bc0a
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 0x45bc0a
mov edx, dword [esi + 0x144]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x45bc0a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.0045bcb0
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x45bc99
mov ecx, dword [esi]
push esi
mov dword [ecx + 0x14], 0x15
mov edx, dword [esi]
mov eax, dword [esi + 0x14]
mov dword [edx + 0x18], eax
mov ecx, dword [esi]
call dword [ecx]
add esp, 4
push esi
call fcn.0045bcb0
add esp, 4
pop esi
ret

Function at 0x4a2d36
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x4a2d6e
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.004a0dc0
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.004a0d98
jmp 0x4a2d7a
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x4a4424
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 0x4a4466
call fcn.004aa199
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x4a4466
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x4a445d
xor eax, eax
jmp 0x4a446e
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.004a4474
pop edi
pop esi
pop ebx
ret 4
Function at 0x4aa6c9
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 0x4aa6f7
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4aa715
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004aa62f
jmp 0x4aa715
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4aa715
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004aa62f
test edi, edi
mov eax, edi
jne 0x4aa6ff
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4aaa50
Capabilities:
Encode data using xor

Disassembly:
call 0x4aaa10
mov dword [esp], esi
pop word [esp]
call 0x4aaa52
mov byte [edx], al
nop
test dword [edx], 0x57c74385
add byte [eax], al
add byte [eax + 0x2f79002], cl
test dword [ebx - 0x39], eax
push edi
xor al, cl
sub edi, ebx
js 0x4aaa38
mov dword [eax - 0x6b], edi
aad 0x44
imul ebx
jmp 0x4aaa2f
call 0x4ab82e
pushal
mov dword [esp + 0xd], ecx
jmp 0x4ab4d1
mov word [esp + 0x16], sp
push dword [esp + 0x1a]
xchg dword [esp + 0x34], ebp
pushal
mov dword [esp + 0xb], eax
pop dword [esp]
call fcn.004aacbe
lea esp, [esp + 2]
call fcn.004ab503
sbb al, 0x9f
punpckhdq mm3, qword [ecx + 0x66f07a20]
add eax, esi
ja 0x4ab56e
jmp 0x4ab4eb
add ch, bl
mov edx, 0x9f0c3d82
lea edx, [eax + 0xc1]
lea edx, [ebx*4]
bswap edx
not dx
jmp 0x4ab5f4
push dword [esp + 0x20]
ret 0x24
Function at 0x4ca7fe
Capabilities:
Encode data using xor

Disassembly:
call 0x4c9aa7
jmp 0x4ca793
cmp dword [esp + 4], 0
jmp 0x4ca7aa
lea esp, [esp + 3]
lea esp, [esp + 1]
jmp 0x4ca74d
jmp 0x4ca763
pop eax
sub eax, 0xeffa58b8
jmp 0x4ca7ec
jne 0x4ca72c
pushal
jmp 0x4c9aa2
call 0x4ca7fe
inc ecx
inc esp
push esi
inc ecx
push eax
dec ecx
xor esi, dword [edx]
insb byte es:[edi], dx
insb byte es:[edi], dx
add cl, ch
jns 0x4ca800
invalid
invalid

Function at 0x66552b
Capabilities:
Parse pe header

Disassembly:
push eax
jmp 0x662117
call fcn.0066211c
movzx ebx, word [eax + 0x3c]
jmp 0x665550
jmp 0x66571f
add ebx, eax
cmp word [ebx], 0x4550
jmp 0x6656b6
cmp word [eax], 0x5a4d
je 0x6640af
jne 0x6656f2
sbb dword [edx + esi + 0x6123a455], ebx
jmp 0x6f516e00
je 0x661fe2
jne 0x6656f2
dec edx
rol dword [ebx + 0x26], cl
aad 0x2c
rcl byte [edx + ecx*8 - 0x53]
pop esp
stosb byte es:[edi], al
inc esi
rcl dword [ecx + 0x30], 0xc3
inc esi
retf
sub eax, 0x10000
jmp 0x66556a
push dword [esp + 2]
push word [esp + 7]
lea esp, [esp + 2]
lea esp, [esp + 0xc]
xor ax, ax
jmp 0x66556a
Function at 0x403a8f
Capabilities:
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [ebp + 8]
cmp dword [eax + 4], 0
jne 0x403aaf
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x28], 0xffffffff
xor eax, eax
jmp 0x403b78
mov dword [ebp - 8], 0
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.00407e4a
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x403adc
mov eax, 1
jmp 0x403b78
push 0x11
push 2
push 2
call sub.WSOCK32.dll_socket
mov edx, dword [ebp + 8]
mov dword [edx + 0x28], eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x28], 0
jae 0x403b16
push 0x418a94
call fcn.0040a3a8
add esp, 4
lea ecx, [ebp - 4]
push ecx
call fcn.00407e82
add esp, 4
mov eax, 1
jmp 0x403b78
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 8]
add eax, 0x28
push eax
call fcn.00407ea8
add esp, 8
test eax, eax
je 0x403b4d
push 0x418ab0
call fcn.0040a3a8
add esp, 4
lea ecx, [ebp - 4]
push ecx
call fcn.00407e82
add esp, 4
mov eax, 1
jmp 0x403b78
mov edx, dword [ebp - 4]
push edx
call fcn.00407dce
add esp, 4
push eax
call sub.WSOCK32.dll_htons
and eax, 0xffff
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
lea edx, [ebp - 4]
push edx
call fcn.00407e82
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x403b7c
Capabilities:
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x2c]
push eax
call fcn.00407e4a
add esp, 8
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x403bab
mov eax, 1
jmp 0x403c8a
push 0x11
push 2
push 2
call sub.WSOCK32.dll_socket
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x24], eax
mov edx, dword [ebp + 8]

Function at 0x403c8e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
test ecx, ecx
je 0x403da0
mov edx, dword [ebp + 8]
movsx eax, byte [edx]
cmp eax, 0xa
jne 0x403cef
mov ecx, dword [0x41ed60]
and ecx, 0x3f
shl ecx, 7
mov edx, dword [0x41ed64]
and edx, 0x7f
mov byte [ecx + edx + 0x41cd60], 0
mov eax, dword [0x41ed64]
in eax, dx
inc ecx
add byte [ebx + 0x64a301c0], al
in eax, dx
inc ecx
add byte [ebx + 0x41ed600d], cl
add byte [ebx + 0xd8901c1], al
pushal
in eax, dx
inc ecx
add bh, al
add eax, 0x41ed64
add byte [eax], al
add byte [eax], al
jmp 0x403d6b
mov edx, dword [ebp + 8]
movsx eax, byte [edx]
cmp eax, 9
jne 0x403d3b
mov ecx, dword [0x41ed60]
and ecx, 0x3f
shl ecx, 7
mov edx, dword [0x41ed64]
and edx, 0x7f
mov byte [ecx + edx + 0x41cd60], 0x20
mov eax, dword [0x41ed64]
add eax, 1
mov dword [0x41ed64], eax
mov eax, dword [0x41ed64]
cdq
xor eax, edx
sub eax, edx
and eax, 7
xor eax, edx
invalid
Function at 0x404096
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c0
mov dword [ebp - 0x1a4], 0xa
mov dword [ebp - 8], 0x418b68
mov dword [0x41ed68], 0x418b70
mov dword [ebp - 0x10], 1
push 0x418b7c
mov eax, dword [ebp + 0x10]
push eax
call fcn.0040ffb0
add esp, 8
mov ecx, dword [ebp - 0x10]
mov dword [ecx*4 + 0x41ed68], eax
mov edx, dword [ebp - 0x10]
mov eax, dword [edx*4 + 0x41ed68]
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
test eax, eax
je 0x40410e
push 0x418b84
push 0
call fcn.0040ffb0
add esp, 8
mov edx, dword [ebp - 0x10]
mov dword [edx*4 + 0x41ed68], eax
jmp 0x4040dc
mov eax, dword [ebp - 0x10]
sub eax, 1
mov dword [ebp - 0x10], eax
cmp dword [ebp + 0xc], 0
jne 0x404134
mov ecx, dword [ebp + 8]
push ecx
call fcn.00403fab
add esp, 4
test eax, eax
jne 0x404134
xor eax, eax
jmp 0x40426d
mov edx, dword [ebp + 0x14]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00404021
add esp, 8
test eax, eax
jne 0x40414f
xor eax, eax
jmp 0x40426d
push 0
mov ecx, dword [0x41f7a0]
push ecx
call dword [sym.imp.USER32.dll_GetSystemMenu]
mov dword [ebp - 0xc], eax
push 0
push 0
push 0x800
mov edx, dword [ebp - 0xc]
push edx
call dword [sym.imp.USER32.dll_AppendMenuA]
push 0x418b8c
push 0x401
push 0
mov eax, dword [ebp - 0xc]
push eax
call dword [sym.imp.USER32.dll_AppendMenuA]
mov ecx, dword [ebp - 8]
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp - 0x1a4]
neg edx
push edx
call dword [sym._getenv]
mov dword [0x41f7a4], eax
lea eax, [ebp - 0x1a0]
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
test eax, eax
je 0x4041e6
mov ecx, dword [0x41f7a4]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, 1
jmp 0x40426d
push fcn.00402f12
call sub.WSOCK32.dll_WSASetBlockingHook
push 0x41ed68
mov edx, dword [ebp - 0x10]
push edx
call fcn.00402f72
add esp, 8
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x404255
push 1
push 0x418ba4
push 0x418bb0
mov eax, dword [0x41f7a0]
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
push 0
push 0
lea ecx, [ebp - 0x1c0]
push ecx
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x404255
lea edx, [ebp - 0x1c0]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x1c0]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x404222
call sub.WSOCK32.dll_WSACleanup
mov ecx, dword [0x41f7a4]
push ecx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov eax, dword [ebp - 0x1b8]
mov esp, ebp
pop ebp
ret 0x10

Function at 0x407769
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x14]
add eax, 4
push eax
mov ecx, dword [ebp + 0x14]
add ecx, 8
push ecx
push 0
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.WSOCK32.dll_recvfrom
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
Function at 0x407798
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x14]
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [ebp + 0x14]
add edx, 8
push edx
push 0
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call sub.WSOCK32.dll_sendto
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret

Function at 0x407bf0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 8]
push eax
call sub.WSOCK32.dll_gethostbyname
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x407c0c
xor eax, eax
jmp 0x407c36
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 8], edx
cmp dword [ebp - 8], 0
jne 0x407c1f
xor eax, eax
jmp 0x407c36
push 4
lea eax, [ebp - 0xc]
push eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx]
push edx
call fcn.0040653b
add esp, 0xc
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret

Function at 0x407ed5
Capabilities:
Connect socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov eax, dword [ebp + 0xc]
add eax, 8
mov dword [ebp - 4], eax
push 0x10
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call sub.WSOCK32.dll_connect
test eax, eax
jge 0x407f27
call sub.WSOCK32.dll_WSAGetLastError
mov esi, eax
call fcn.00410630
mov dword [eax], esi
call fcn.00410630
cmp dword [eax], 0x2734
je 0x407f27
call fcn.00410630
cmp dword [eax], 0x2733
je 0x407f27
or eax, 0xffffffff
jmp 0x407f29
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x40afb0
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push 0
push 0x41a280
call sub.WSOCK32.dll_getservbyname
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x40afe6
push 0xc7
call sub.WSOCK32.dll_htons
and eax, 0xffff
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0x41a288
jmp 0x40aff9
mov eax, dword [ebp - 8]
movsx ecx, word [eax + 8]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], 6
mov ecx, dword [ebp - 0xc]
push ecx
call sub.WSOCK32.dll_getprotobyname
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x40b01c
mov edx, dword [ebp - 0x14]
movsx eax, word [edx + 8]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
push ecx
push 1
push 2
call sub.WSOCK32.dll_socket
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x40b047
push 0x41a28c
call fcn.0040a3a8
add esp, 4
or eax, 0xffffffff
jmp 0x40b14b
mov edx, dword [ebp + 0xc]
push edx
call fcn.00407dce
add esp, 4
test eax, eax
jne 0x40b067
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00407d74
add esp, 8
mov edx, dword [ebp + 0xc]
push edx
call fcn.00407df2
add esp, 4
test eax, eax
jne 0x40b09f
cmp dword [ebp + 8], 0
je 0x40b08d
push 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.00407d90
add esp, 8
jmp 0x40b09f
call sym._smux_sess_register
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00407d90
add esp, 8
cmp dword [ebp + 8], 0
je 0x40b123
mov dword [ebp - 0x1c], 1
push 4
lea edx, [ebp - 0x1c]
push edx
push 4
push 0xffff
mov eax, dword [ebp - 0x18]
push eax
call sub.WSOCK32.dll_setsockopt
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x18]
push edx
call fcn.00407ea8
add esp, 8
test eax, eax
je 0x40b0f4
push 0x41a2a0
call fcn.0040a3a8
add esp, 4
lea eax, [ebp - 0x18]
push eax
call fcn.00407303
add esp, 4
or eax, 0xffffffff
jmp 0x40b14b
push 5
mov ecx, dword [ebp - 0x18]
push ecx
call sub.WSOCK32.dll_listen
test eax, eax
jge 0x40b121
push 0x41a2b4
call fcn.0040a3a8
add esp, 4
lea edx, [ebp - 0x18]
push edx
call fcn.00407303
add esp, 4
or eax, 0xffffffff
jmp 0x40b14b
jmp 0x40b148
mov eax, dword [ebp + 0xc]
push eax
lea ecx, [ebp - 0x18]
push ecx
call fcn.00407ed5
add esp, 8
test eax, eax
je 0x40b148
lea edx, [ebp - 0x18]
push edx
call fcn.00407303
add esp, 4
or eax, 0xffffffff
jmp 0x40b14b
mov eax, dword [ebp - 0x18]
mov esp, ebp
pop ebp
ret
Function at 0x40fd50
Capabilities:
Terminate process

Disassembly:
mov eax, dword [0x41ee20]
push ebx
push ebp
mov ebp, dword [esp + 0xc]
cmp eax, 1
push esi
jne 0x40fd6f
push ebp
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test eax, eax
mov dword [0x41ee1c], 1
mov byte [0x41ee18], bl
jne 0x40fdc9
mov ecx, dword [0x420510]
test ecx, ecx
je 0x40fdb7
mov esi, dword [0x42050c]
sub esi, 4
cmp esi, ecx
jb 0x40fdb7
mov eax, dword [esi]
test eax, eax
je 0x40fdb0
call eax
mov ecx, dword [0x420510]
sub esi, 4
cmp esi, ecx
jae 0x40fda2
push 0x41801c
push 0x418014
call fcn.0040fe00
add esp, 8
push 0x418024
push 0x418020
call fcn.0040fe00
add esp, 8
test ebx, ebx
jne 0x40fdf0
push ebp
mov dword [0x41ee20], 1
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop esi
pop ebp
pop ebx
ret

Function at 0x410300
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417210
push 0x413bb8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
call dword [sym.imp.KERNEL32.dll_GetVersion]
xor edx, edx
mov dl, ah
mov dword [0x41edf0], edx
mov ecx, eax
and ecx, 0xff
mov dword [0x41edec], ecx
shl ecx, 8
add ecx, edx
mov dword [0x41ede8], ecx
shr eax, 0x10
mov dword [0x41ede4], eax
call fcn.004106c0
test eax, eax
jne 0x41036a
push 0x1c
call fcn.004104d0
add esp, 4
mov dword [ebp - 4], 0
call fcn.00411250
call fcn.00413ab0
invalid
invalid
aam 0x70
inc ecx

Function at 0x4104d0
Capabilities:
Terminate process

Disassembly:
cmp dword [0x41ee30], 1
jne 0x4104de
call fcn.00413c90
invalid
inc esp
Function at 0x4122e0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x420500]
sub esp, 0x41c
cmp eax, ecx
push ebx
push ebp
push esi
push edi
jae 0x41248d
mov ecx, eax
mov esi, eax
sar ecx, 5
and esi, 0x1f
mov edx, dword [ecx*4 + 0x420400]
lea edi, [ecx*4 + 0x420400]
shl esi, 3
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], esi
mov cl, byte [esi + edx + 4]
test cl, 1
je 0x41248d
mov ebx, dword [esp + 0x438]
xor ebp, ebp
cmp ebx, ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
jne 0x41234e
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
test cl, 0x20
je 0x41235f
push 2
push ebp
push eax
call fcn.00412220
add esp, 0xc
mov eax, dword [edi]
add eax, esi
test byte [eax + 4], 0x80
je 0x4124be
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x18], 0
test ebx, ebx
mov edi, ebp
jbe 0x412409
lea eax, [esp + 0x28]
mov ecx, edi
sub ecx, ebp
cmp ecx, ebx
jae 0x4123ba
mov cl, byte [edi]
inc edi
cmp cl, 0xa
jne 0x4123a7
mov esi, dword [esp + 0x20]
mov byte [eax], 0xd
inc esi
inc eax
mov dword [esp + 0x20], esi
mov byte [eax], cl
inc eax
mov edx, eax
lea ecx, [esp + 0x28]
sub edx, ecx
cmp edx, 0x400
jl 0x41238a
mov esi, eax
lea edx, [esp + 0x28]
lea eax, [esp + 0x1c]
sub esi, edx
mov edx, dword [esp + 0x24]
push 0
push eax
lea ecx, [esp + 0x30]
mov eax, dword [edx]
push esi
push ecx
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx + eax]
push edx
call dword [sym.__setmode]
test eax, eax
je 0x4124af
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add edx, eax
cmp eax, esi
mov dword [esp + 0x10], edx
jl 0x412405
mov eax, edi
sub eax, ebp
cmp eax, ebx
jb 0x412386
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
test eax, eax
jne 0x41247e
mov eax, dword [esp + 0x18]
test eax, eax
je 0x412452
cmp eax, 5
jne 0x41243b
mov dword [0x41eddc], eax
mov dword [0x41edd8], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
push eax
call fcn.00414470
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
add bl, al
mov ecx, dword [esp + 0x24]
mov edx, dword [ecx]
test byte [esi + edx + 4], 0x40
je 0x412472
cmp byte [ebp], 0x1a
jne 0x412472
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x41c
ret
mov dword [0x41edd8], 0x1c
jmp 0x412497
invalid
inc esp

Function at 0x412590
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [0x420500]
sub esp, 0xc
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push esi
cmp ebx, eax
push edi
jae 0x4127c5
mov eax, ebx
and ebx, 0x1f
sar eax, 5
pop edi
pop esi
pop ebp
mov dword [0x41edd8], 9
mov dword [0x41eddc], 0
or eax, 0xffffffff
pop ebx
add esp, 0xc
ret
Function at 0x413450
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [0x41ef78]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
push esi
xor esi, esi
xor ebx, ebx
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
test eax, eax
jne 0x413492
call edi
mov esi, eax
test esi, esi
je 0x41347c
mov eax, 1
jmp 0x41348d
call ebp
mov ebx, eax
test ebx, ebx
je 0x41359f
mov eax, 2
mov dword [0x41ef78], eax
cmp eax, 1
jne 0x413532
test esi, esi
jne 0x4134ab
call edi
mov esi, eax
test esi, esi
je 0x41359f
cmp word [esi], 0
mov eax, esi
je 0x4134c5
add eax, 2
cmp word [eax], 0
jne 0x4134b3
add eax, 2
cmp word [eax], 0
jne 0x4134b3
sub eax, esi
push 0
sar eax, 1
inc eax
push 0
mov ebp, eax
push 0
push 0
push ebp
push esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edi, eax
test edi, edi
je 0x413524
push edi
call fcn.0040f470
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x413524
push 0
push 0
push edi
push ebx
push ebp
push esi
push 0
push 0
add bh, bh
adc eax, sym.imp.KERNEL32.dll_WideCharToMultiByte
test eax, eax
jne 0x413516
push ebx
call fcn.0040f2b0
add esp, 4
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x41359f
test ebx, ebx
jne 0x413543
call ebp
mov ebx, eax
test ebx, ebx
je 0x41359f
mov cl, byte [ebx]
mov eax, ebx
test cl, cl
je 0x41355b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41354b
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x41354b
sub eax, ebx
inc eax
mov esi, eax
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret

Function at 0x413cd0
Capabilities:
Write file on windows

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x1a8
mov eax, 0x41c9f0
push ebx
push ebp
push esi
push edi
xor ebp, ebp
cmp ecx, dword [eax]
je 0x413cf4
add eax, 8
inc ebp
cmp eax, 0x41ca80
jb 0x413ce5
cmp ecx, dword [ebp*8 + 0x41c9f0]
jne 0x413e9b
invalid
mov eax, dword [0x41ee30]
cmp eax, 1
je 0x413e5d
test eax, eax
jne sym.__ismbbkprint
cmp dword [0x41a604], 1
je 0x413e5d
mov eax, dword [0x420400]
test eax, eax
je 0x413e6e
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x413e78
push 0xfffffffffffffff4
mov edx, dword [ebp*8 + 0x41c9f4]
lea ecx, [esp + 0x10]
push 0
push ecx
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.__setmode]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1a8
ret