joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4033a1
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0x10]
mov dword [esp], eax
call sub.WS2_32.dll_gethostbyname
test eax, eax
mov esi, eax
push ecx
je 0x4033fa
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.0040b1ee
mov eax, dword [esi + 0xc]
mov word [ebx], 2
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebx + 4], eax
movzx eax, word [ebp + 0xc]
mov dword [esp], eax
call sub.WS2_32.dll_htons
push edx
mov word [ebx + 2], ax
mov al, 1
jmp 0x4033fc
xor eax, eax
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret

Function at 0x403403
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
test esi, 1
je 0x40343b
lea eax, [ebp - 0x24]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x8004667e
mov dword [esp], ebx
mov dword [ebp - 0x24], 1
call sub.WS2_32.dll_ioctlsocket
sub esp, 0xc
test esi, 2
je 0x4034d4
lea edi, [ebp - 0x25]
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], edi
mov dword [esp + 8], 8
mov dword [esp + 4], 0xffff
mov dword [esp], ebx
mov byte [ebp - 0x25], 1
call sub.WS2_32.dll_setsockopt
sub esp, 0x14
test eax, eax
jne 0x4034d4
lea eax, [ebp - 0x24]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], edi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0xc
mov dword [esp + 8], eax
mov dword [esp + 4], 0x98000004
mov dword [esp], ebx
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x20], 0x2bf20
mov dword [ebp - 0x1c], 0x1388
call sub.WS2_32.dll_WSAIoctl
sub esp, 0x24
and esi, 4
je 0x403507
lea eax, [ebp - 0x24]
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov dword [esp + 4], 6
mov dword [esp], ebx
mov byte [ebp - 0x24], 1
call sub.WS2_32.dll_setsockopt
sub esp, 0x14
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x403ae4
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebp
or ecx, 0xffffffff
mov ebp, esp
xor eax, eax
push edi
push esi
push ebx
sub esp, 0x34c
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
repne scasb al, byte es:[edi]
not ecx
lea esi, [ecx + 9]
cmp esi, 0x200
jle 0x4036d3
xor eax, eax
jmp 0x40386f
lea edx, [ebp - 0x218]
mov dword [esp], edx
mov dword [esp + 8], 0x200
mov dword [esp + 4], 0
mov dword [ebp - 0x33c], edx
call fcn.0040b1ee
movzx eax, word [ebp + 0x10]
mov byte [ebp - 0x218], 4
mov byte [ebp - 0x217], 1
mov dword [esp], eax
call sub.WS2_32.dll_htons
mov word [ebp - 0x32a], ax
lea eax, [ebp - 0x32a]
push ecx
mov dword [esp + 4], eax
lea eax, [ebp - 0x216]
mov dword [esp], eax
mov dword [esp + 8], 2
call fcn.0040b2af
lea eax, [ebp - 0x328]
mov dword [esp + 4], eax
lea eax, [ebp - 0x214]
mov dword [esp], eax
mov dword [esp + 8], 4
mov dword [ebp - 0x328], 0x1000000
call fcn.0040b2af
mov edi, dword [ebp + 0xc]
xor eax, eax
mov byte [ebp - 0x210], 0
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
lea eax, [ebp - 0x20f]
mov dword [esp], eax
not ecx
dec ecx
mov dword [esp + 8], ecx
call fcn.0040b2af
mov edx, dword [ebp - 0x33c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], edx
mov byte [ebp + esi - 0x218], 0
call sub.WS2_32.dll_send
sub esp, 0x10
cmp eax, esi
jne 0x4036cc
lea esi, [ebp - 0x324]
mov dword [esp + 8], 8
lea edi, [ebp - 0x31c]
mov dword [esp + 4], 0
mov dword [esp], esi
call fcn.0040b1ee
lea eax, [ebx + 1]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], edi
mov dword [esp], eax
mov dword [ebp - 0x318], ebx
mov dword [ebp - 0x31c], 1
call sub.WS2_32.dll_select
sub esp, 0x14
test eax, eax
jle 0x4036cc
mov dword [esp + 4], edi
mov dword [esp], ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
push edx
push edx
je 0x4036cc
mov dword [esp + 0xc], 0
mov dword [esp + 8], 8
mov dword [esp + 4], esi
mov dword [esp], ebx
call sub.WS2_32.dll_recv
sub esp, 0x10
cmp eax, 8
jne 0x4036cc
cmp byte [ebp - 0x323], 0x5a
sete al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
push ebx
mov ebx, dword [esp + 0xc]
mov eax, dword [esp + 8]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov ebx, dword [ebx]
cmp ebx, 1
je 0x403b2c
jb 0x403b1a
cmp ebx, 2
je 0x403b3e
cmp ebx, 3
jne 0x403b50
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
pop ebx
jmp fcn.00403a1d
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
pop ebx
jmp fcn.0040350f
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
pop ebx
jmp 0x4036a6
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
pop ebx
jmp fcn.00403877
mov al, 1
pop ebx
ret
Function at 0x403eb7
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x13c
mov ebx, dword [ebp + 8]
lea edi, [ebp - 0x11c]
lea esi, [ebx + 1]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x118], ebx
mov dword [ebp - 0x11c], 1
mov dword [ebp - 0x120], 0
test eax, eax
mov dword [ebp - 0x124], eax
jne 0x403f23
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.WS2_32.dll_select
sub esp, 0x14
test eax, eax
je 0x403ecf
jmp 0x403f54
lea eax, [ebp - 0x124]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], 0
mov dword [esp], esi
call sub.WS2_32.dll_select
sub esp, 0x14
test eax, eax
jne 0x403f54
xor eax, eax
jmp 0x403f6b
test eax, eax
js 0x403f50
mov dword [esp + 4], edi
mov dword [esp], ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
push edx
setne al
push edx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x2c
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
test esi, esi
je 0x403f9a
cmp ebx, 0xffffffff
jne 0x403f9c
mov ecx, ebx
xor eax, eax
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
lea ebx, [ecx - 1]
jmp 0x403f9c
xor ebx, ebx
mov dword [esp], 0x418288
call sub.KERNEL32.dll_EnterCriticalSection
mov eax, dword [ebp + 8]
push edi
mov dword [esp + 4], 0x2d
mov dword [esp], eax
call fcn.00403eb7
test al, al
jne 0x403fca
xor esi, esi
or ebx, 0xffffffff
jmp 0x4040bc
lea edi, [ebx + 5]
cmp edi, dword [0x418284]
jbe 0x403ffd
cmp dword [0x418280], 0
je 0x403fea
mov dword [esp], 0x418280
call fcn.00405434
mov dword [esp], edi
call sub.msvcrt.dll_malloc
mov dword [0x418284], edi
mov dword [0x418280], eax
mov eax, dword [0x418280]
test eax, eax
je 0x403fc0
test ebx, ebx
jle 0x404052
mov edx, dword [0x413714]
lea eax, [eax + 5]
cmp dword [ebp + 8], edx
jne 0x404042
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0x41b018
mov dword [esp], 0x41b028
call fcn.0040f3a6
jmp 0x404052
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.0040b2af
mov eax, dword [0x418280]
inc ebx
xor esi, esi
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x1c], edi
mov dword [eax], ebx
or ebx, 0xffffffff
mov byte [eax + 4], dl
cmp esi, edi
jae 0x4040bc
mov eax, dword [ebp - 0x1c]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [0x418280]
add eax, esi
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.WS2_32.dll_send
sub esp, 0x10
cmp eax, 0xffffffff
mov ebx, eax
jne 0x4040b5
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
jne 0x4040bc
mov dword [esp], 1
call fcn.004053d0
jmp 0x404068
add esi, eax
sub dword [ebp - 0x1c], eax
jmp 0x404068
mov dword [esp], 0x418288
call sub.KERNEL32.dll_LeaveCriticalSection
test esi, esi
push ecx
je 0x4040d9
sub esi, 5
or eax, 0xffffffff
inc ebx
cmovne eax, esi
jmp 0x4040dc
or eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4040e4
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov ebx, 3
sub esp, 0x13c
lea edi, [ebp - 0x124]
lea esi, [ebp - 0x11c]
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [ebp - 0x118], eax
inc eax
mov dword [esp + 4], esi
mov dword [esp], eax
mov dword [ebp - 0x11c], 1
mov dword [ebp - 0x124], 0xf
mov dword [ebp - 0x120], 0
call sub.WS2_32.dll_select
sub esp, 0x14
test eax, eax
jne 0x404194
test ebx, ebx
jne 0x40418e
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 2
mov dword [esp], eax
call fcn.00403f73
inc eax
je 0x404181
mov ebx, 3
jmp 0x404101
lea eax, [ebp + 8]
mov dword [esp], eax
call fcn.00403b94
jmp 0x4041ae
dec ebx
jmp 0x404101
js 0x4041ae
mov eax, dword [ebp + 8]
mov dword [esp + 4], esi
mov dword [esp], eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
push edx
setne al
push edx
jmp 0x4041b0
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 0x10]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.WS2_32.dll_recv
sub esp, 0x10
cmp eax, 0xffffffff
je 0x4041fc
test eax, eax
mov edx, eax
jne 0x404218
lea eax, [ebp + 8]
mov dword [esp], eax
call fcn.00403b94
xor edx, edx
jmp 0x404218
call sub.WS2_32.dll_WSAGetLastError
xor edx, edx
cmp eax, 0x2733
je 0x404218
lea eax, [ebp + 8]
mov dword [esp], eax
call fcn.00403b94
or edx, 0xffffffff
mov eax, edx
leave
ret

Function at 0x404278
Capabilities:
Get disk information

Disassembly:
push ebp
mov eax, 0x101c
mov ebp, esp
push edi
push esi
push ebx
call fcn.004128fc
sub esp, eax
mov edi, dword [ebp + 8]
lea esi, [ebp - 0x1018]
mov dword [esp + 4], esi
mov dword [esp], 0x1000
call sub.KERNEL32.dll_GetLogicalDriveStringsA
test eax, eax
push ecx
push ecx
je 0x4042ad
mov ebx, esi
jmp 0x4042c7
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xf
jmp 0x4042f5
mov eax, ebx
sub eax, esi
cmp byte [ebx], 0
je 0x4042e5
mov dword [esp], ebx
add ebx, 4
call sub.KERNEL32.dll_GetDriveTypeA
push edx
mov byte [ebx - 2], al
mov byte [ebx - 1], 7
jmp 0x4042c7
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov dword [esp + 4], 0xe
mov dword [esp], edi
call fcn.00403f73
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4045ac
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov eax, 0x169c
mov ebp, esp
push edi
push esi
push ebx
call fcn.004128fc
sub esp, eax
mov dword [esp], 0x8003
lea ebx, [ebp - 0x1530]
call sub.KERNEL32.dll_SetErrorMode
mov eax, dword [ebp + 8]
push esi
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4139a2
mov dword [esp + 4], 0x204
mov dword [esp], ebx
call fcn.0040afa3
test eax, eax
js 0x404816
lea eax, [ebp - 0x1670]
mov dword [esp], ebx
mov dword [esp + 4], eax
call sub.KERNEL32.dll_FindFirstFileA
cmp eax, 0xffffffff
mov esi, eax
push ebx
push ebx
je 0x4047cd
lea ebx, [ebp - 0x1644]
lea edi, [ebp - 0x132c]
cmp dword [0x4182a4], 0
jne 0x40463a
mov dword [esp], esi
call sub.KERNEL32.dll_FindClose
push ecx
jmp 0x4047cd
mov dword [esp + 4], 0x4139a6
mov dword [esp], ebx
call fcn.0040b055
test eax, eax
je 0x4047ac
mov dword [esp + 4], 0x4139a8
mov dword [esp], ebx
call fcn.0040b055
test eax, eax
je 0x4047ac
mov eax, dword [ebp + 8]
mov dword [esp + 4], ebx
add eax, 0x204
mov dword [esp], eax
call fcn.0040b0b5
test al, al
je 0x404738
mov eax, dword [ebp - 0x1670]
mov edx, dword [ebp + 8]
test al, 0x10
je 0x4046c5
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x1018]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._d_a_s_a_s_a
mov dword [esp + 4], 0x1000
mov dword [esp], edx
mov dword [ebp - 0x167c], edx
call fcn.0040afa3
jmp 0x404709
mov dword [esp + 0x1c], edx
mov edx, dword [ebp - 0x1650]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._d_a_s_a_I64u_a_s_a
mov dword [esp + 0x14], edx
mov edx, dword [ebp - 0x1654]
mov dword [esp + 4], 0x1000
mov dword [esp + 0x18], edx
lea edx, [ebp - 0x1018]
mov dword [esp], edx
mov dword [ebp - 0x167c], edx
call fcn.0040afa3
test eax, eax
js 0x4047ac
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x167c]
mov eax, dword [ebp + 8]
mov dword [esp + 4], 0x13
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30c]
mov dword [esp], eax
call fcn.00403f73
test byte [ebp - 0x1670], 0x10
je 0x4047ac
mov eax, dword [ebp + 8]
mov dword [esp + 8], 0x104
add eax, 0x204
mov dword [esp + 4], eax
lea eax, [ebp - 0x1128]
mov dword [esp], eax
call fcn.0040ad48
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], ebx
mov dword [esp + 8], 0x4139ab
mov dword [esp + 4], 0x204
mov dword [esp + 0xc], eax
mov dword [esp], edi
call fcn.0040afa3
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x308]
mov eax, dword [eax + 0x30c]
mov dword [esp], edi
lea edx, [ecx + 1]
mov dword [ebp - 0x1024], edx
mov dword [ebp - 0x1020], eax
call fcn.004045ac
lea eax, [ebp - 0x1670]
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.KERNEL32.dll_FindNextFileA
test eax, eax
push edx
push edx
jne 0x404623
jmp 0x40462c
mov eax, dword [ebp + 8]
cmp dword [eax + 0x308], 0
jne 0x404816
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x14
mov eax, dword [eax + 0x30c]
mov dword [esp], eax
call fcn.00403f73
mov eax, dword [ebp + 8]
cmp byte [eax + 0x310], 0
je 0x404816
lea eax, [ebp + 8]
mov dword [esp], eax
call fcn.00405434
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40481e
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8cc
mov ebx, dword [esp + 0x8e4]
mov eax, dword [esp + 0x8e8]
mov dword [esp + 4], 0x4139b1
mov dword [esp], ebx
mov dword [esp + 8], eax
call fcn.0040ad48
mov eax, dword [esp + 0x8e0]
mov dword [esp + 4], 0x4139b3
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov esi, eax
je 0x404911
lea edi, [esp + 0x28]
mov dword [esp], edi
lea ebp, [esp + 0xc0]
call fcn.00411cb3
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x800
mov dword [esp + 4], 1
mov dword [esp], ebp
call sub.msvcrt.dll_fread
test eax, eax
je 0x4048b9
cmp dword [0x4182a0], 0
je 0x4048b9
mov dword [esp + 8], eax
mov dword [esp + 4], ebp
mov dword [esp], edi
call fcn.00411ce1
jmp 0x40487e
lea ebp, [esp + 0x18]
mov dword [esp + 4], edi
mov dword [esp], ebp
call fcn.00411d8f
xor edx, edx
mov cl, byte [ebp + edx]
mov al, cl
and ecx, 0xf
shr al, 4
cmp al, 0xa
mov edi, eax
sbb eax, eax
and eax, 0xfffffff9
cmp cl, 0xa
lea eax, [eax + edi + 0x37]
mov byte [ebx + edx*2], al
sbb eax, eax
and eax, 0xfffffff9
lea ecx, [eax + ecx + 0x37]
mov byte [ebx + edx*2 + 1], cl
inc edx
cmp edx, 0x10
jne 0x4048cb
mov eax, dword [esp + 0x8e8]
mov byte [ebx + eax - 1], 0
mov dword [esp], esi
call sub.msvcrt.dll_fclose
add esp, 0x8cc
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40491c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
xor esi, esi
push ebx
sub esp, 0x9c
lea ebx, [ebp - 0x5c]
mov dword [esp + 8], 0x44
mov dword [esp + 4], 0
mov dword [esp], ebx
call fcn.0040b1ee
cmp dword [ebp + 0x10], 0
mov dword [ebp - 0x5c], 0x44
jne 0x404964
mov dword [ebp - 0x30], 1
mov esi, 0x8000000
mov word [ebp - 0x2c], 0
lea edi, [ebp - 0x6c]
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
mov dword [esp], edi
call fcn.0040b1ee
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x24], edi
mov dword [esp + 0x20], ebx
mov dword [esp + 0x1c], 0
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call sub.KERNEL32.dll_CreateProcessA
sub esp, 0x28
test eax, eax
je 0x4049e4
mov eax, dword [ebp - 0x6c]
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, dword [ebp - 0x68]
push edi
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
push eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x4049ec
Capabilities:
Check if file exists
Delete file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push ebx
sub esp, 0x14
mov ebx, dword [ebp + 8]
mov dword [esp], ebx
call sub.KERNEL32.dll_GetFileAttributesA
cmp eax, 0xffffffff
push edx
je 0x404a1a
test al, 6
je 0x404a1a
mov dword [esp + 4], pe_nt_image_headers32
mov dword [esp], ebx
call sub.KERNEL32.dll_SetFileAttributesA
push ecx
push ecx
mov dword [esp], ebx
call sub.KERNEL32.dll_DeleteFileA
mov ebx, dword [ebp - 4]
test eax, eax
push edx
setne al
leave
ret
Function at 0x404a4e
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.KERNEL32.dll_GetFileAttributesA
cmp eax, 0xffffffff
push edx
je 0x404a70
shr eax, 4
xor eax, 1
and eax, 1
jmp 0x404a72
xor eax, eax
and eax, 1
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sub.KERNEL32.dll_GetFileAttributesA
cmp eax, 0xffffffff
push ecx
je 0x404a96
shr eax, 4
and eax, 1
jmp 0x404a98
xor eax, eax
and eax, 1
leave
ret

Function at 0x404a9d
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov eax, dword [esp + 0x40]
mov dword [esp + 4], 0x4139b3
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov esi, eax
je 0x404b87
mov eax, dword [esp + 0x44]
mov dword [esp + 4], 0x4139b6
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov edi, eax
je 0x404b6b
mov edx, 9
mov ebx, 0x8000
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sub.msvcrt.dll_malloc
mov edx, dword [esp + 0x1c]
test eax, eax
mov ebp, eax
je 0x404b5a
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 1
mov dword [esp], ebp
call sub.msvcrt.dll_fread
test eax, eax
jg 0x404b2a
mov eax, dword [esi + 0xc]
and eax, 0x30
cmp eax, 0x10
sete bl
jmp 0x404b50
mov dword [esp + 0xc], edi
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov dword [esp], ebp
mov dword [esp + 0x1c], eax
call sub.msvcrt.dll_fwrite
mov ecx, dword [esp + 0x1c]
cmp ecx, eax
je 0x404b00
xor ebx, ebx
mov dword [esp], ebp
call sub.msvcrt.dll_free
jmp 0x404b61
sar ebx, 1
dec edx
jne 0x404aea
xor ebx, ebx
mov dword [esp], edi
call sub.msvcrt.dll_fclose
jmp 0x404b6d
xor ebx, ebx
mov dword [esp], esi
call sub.msvcrt.dll_fclose
test bl, bl
mov al, 1
jne 0x404b89
mov eax, dword [esp + 0x44]
mov dword [esp], eax
call fcn.004049ec
xor eax, eax
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x40525e
Capabilities:
Accept command line arguments

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x41c
lea esi, [esp + 0x10]
mov dword [esp + 8], 0x400
mov dword [esp + 4], 0
mov dword [esp], esi
call fcn.0040b1ee
mov eax, dword [esp + 0x438]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [esp + 0x434]
mov dword [esp], eax
call fcn.0040b1ee
call sub.KERNEL32.dll_GetCommandLineA
mov dword [esp + 8], 0x400
mov dword [esp], esi
mov dword [esp + 4], eax
call fcn.0040ad48
xor edx, edx
xor eax, eax
mov cl, byte [esp + eax + 0x10]
test cl, cl
je 0x40535e
cmp cl, 0x22
jne 0x405311
mov edi, dword [esp + 0x434]
lea ecx, [eax + 1]
xor esi, esi
sub edi, eax
mov al, byte [esp + ecx + 0x10]
test al, al
je 0x4052f6
cmp al, 0x22
je 0x4052f6
inc ecx
inc esi
mov byte [edi + ecx - 2], al
jmp 0x4052e2
mov eax, dword [esp + 0x434]
mov byte [eax + esi], 0
cmp dword [esp + 0x430], edx
lea esi, [edx + 1]
jne 0x405354
mov al, 1
jmp 0x405360
cmp cl, 0x20
je 0x405323
mov ebp, dword [esp + 0x434]
mov ecx, eax
sub ebp, eax
jmp 0x40532d
inc eax
inc dword [esp + 0x430]
jmp 0x4052c3
movzx esi, byte [esp + ecx + 0x10]
mov edi, ecx
sub edi, eax
test esi, 0xdf
je 0x405347
inc ecx
mov ebx, esi
mov byte [ebp + ecx - 1], bl
jmp 0x40532d
mov eax, dword [esp + 0x434]
mov byte [eax + edi], 0
jmp 0x405301
lea eax, [ecx + 1]
mov edx, esi
jmp 0x4052c3
xor eax, eax
add esp, 0x41c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x40536b
Capabilities:
Read file on windows

Disassembly:
push ebx
sub esp, 0x28
mov eax, dword [esp + 0x30]
mov dword [esp + 4], 0x4139b3
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov ebx, eax
je 0x4053c9
mov dword [esp + 0xc], eax
lea eax, [esp + 0x1c]
mov dword [esp + 8], 4
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fread
mov dword [esp], ebx
cmp eax, 4
je 0x4053b8
call sub.msvcrt.dll_fclose
jmp 0x4053c9
call sub.msvcrt.dll_fclose
cmp word [esp + 0x1c], 0x5a4d
sete al
jmp 0x4053cb
xor eax, eax
add esp, 0x28
pop ebx
ret

Function at 0x4053e4
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 4], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp], 0
mov dword [esp + 8], eax
call sub.msvcrt.dll__beginthreadex
test eax, eax
je 0x405430
mov dword [esp], eax
call sub.KERNEL32.dll_CloseHandle
mov eax, 1
push edx
jmp 0x405432
xor eax, eax
leave
ret
Function at 0x405524
Capabilities:
Read file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x2c
mov ebp, dword [esp + 0x48]
mov eax, dword [esp + 0x40]
mov dword [esp + 0x14], 0
mov dword [ebp], 0
mov dword [esp + 4], 0x4139f0
mov dword [esp], eax
call sub.msvcrt.dll_fopen
test eax, eax
mov esi, eax
je 0x405644
mov dword [esp + 0xc], 2
mov dword [esp + 4], 0
mov dword [esp + 8], 0
mov dword [esp], eax
call fcn.0040549d
test eax, eax
jne 0x405629
lea edi, [esp + 0x18]
or ebx, 0xffffffff
mov dword [esp + 4], edi
mov dword [esp], esi
call sub.msvcrt.dll_fgetpos
test eax, eax
cmove ebx, dword [esp + 0x18]
test ebx, ebx
jle 0x405629
cmp dword [esp + 0x44], ebx
jge 0x4055b6
cmp dword [esp + 0x44], 0
cmovne ebx, dword [esp + 0x44]
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 0x18], 0
mov dword [esp + 0x1c], 0
call sub.msvcrt.dll_fsetpos
test eax, eax
jne 0x405629
mov dword [esp], ebx
call sub.msvcrt.dll_malloc
test eax, eax
mov dword [esp + 0x14], eax
je 0x405629
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fread
cmp eax, ebx
mov edi, eax
je 0x405618
mov dword [esp + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esp], eax
call sub.msvcrt.dll_realloc
mov dword [esp + 0x14], eax
mov dword [esp], esi
call sub.msvcrt.dll_fclose
mov eax, dword [esp + 0x14]
mov dword [ebp], edi
jmp 0x405646
mov dword [esp], esi
call sub.msvcrt.dll_fclose
cmp dword [esp + 0x14], 0
je 0x405644
lea eax, [esp + 0x14]
mov dword [esp], eax
call fcn.00405434
xor eax, eax
add esp, 0x2c
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x405d70
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
sub esp, 0x10
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0040ae2b
mov dword [esp + 4], 0
mov dword [esp], 1
mov dword [esp + 8], eax
call sub.KERNEL32.dll_OpenProcess
sub esp, 0xc
test eax, eax
mov ebx, eax
je 0x405dc8
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.KERNEL32.dll_TerminateProcess
push esi
test eax, eax
push esi
setne al
mov esi, eax
mov dword [esp], ebx
call sub.KERNEL32.dll_CloseHandle
push eax
jmp 0x405dca
xor esi, esi
lea esp, [ebp - 8]
mov eax, esi
pop ebx
pop esi
pop ebp
ret

Function at 0x406199
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
lea eax, [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], 0
mov dword [esp + 8], eax
mov eax, dword [ebp + 8]
mov dword [esp + 4], eax
mov eax, dword [0x4182b0]
mov dword [esp], eax
call sub.KERNEL32.dll_WriteFile
sub esp, 0x14
leave
ret