joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402c91
Capabilities:
Accept command line arguments

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
push dword [0x446498]
call fcn.00404d27
mov ebp, eax
or ebx, 0xffffffff
xor eax, eax
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov edi, dword [esp + 0x1c]
movzx edx, word [eax]
test dx, dx
je 0x402d91
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], 0x20
mov dword [esp + 0x14], 0x22
cmp dx, word [esp + 0x10]
jne 0x402ce7
push 0x20
pop edx
add eax, 2
cmp word [eax], dx
je 0x402cdf
movzx edx, word [eax]
mov dword [esp + 0x1c], 1
cmp dx, word [esp + 0x14]
jne 0x402d27
add eax, 2
mov esi, eax
movzx ecx, word [eax]
test cx, cx
je 0x402d69
push 0x22
pop edx
cmp cx, dx
je 0x402d19
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x402d09
xor ecx, ecx
cmp word [eax], cx
je 0x402d69
mov ecx, eax
add eax, 2
jmp 0x402d6b
test dx, dx
je 0x402d71
push 0x20
mov esi, eax
pop ecx
cmp dx, cx
je 0x402d19
add eax, 2
push 0x22
pop edx
cmp word [eax], dx
jne 0x402d5f
add eax, 2
movzx ecx, word [eax]
test cx, cx
je 0x402d69
cmp cx, dx
je 0x402d5c
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x402d4c
push 0x20
pop ecx
movzx edx, word [eax]
test dx, dx
jne 0x402d31
jmp 0x402d19
mov ecx, eax
mov edx, dword [esp + 0x1c]
jmp 0x402d73
xor edx, edx
cmp dword [ebp], ebx
jne 0x402d7c
test edi, edi
jne 0x402d99
test edx, edx
je 0x402d81
inc ebx
xor edx, edx
mov esi, edx
movzx edx, word [eax]
test dx, dx
jne 0x402cd5
test edi, edi
jne 0x402daa
mov eax, ebx
jmp 0x402dae
test esi, esi
je 0x402daa
sub ecx, esi
mov eax, esi
sar ecx, 1
mov dword [edi], ecx
inc dword [ebp]
jmp 0x402dae
xor ecx, ecx
mov dword [edi], ecx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret

Function at 0x402e30
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
xor edi, edi
cmp dword [ebp + 8], edi
je 0x402ece
cmp dword [ebp + 0xc], edi
je 0x402ece
push esi
push 0x58
push 8
push dword [0x4460c4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push dword [ebp + 8]
mov esi, eax
or dword [esi + 4], 0xffffffff
mov dword [esi], edi
call sub.MSVCRT.dll__wcsdup
push dword [ebp + 0xc]
mov dword [esi + 8], eax
call sub.MSVCRT.dll__wcsdup
push dword [ebp + 0x14]
mov dword [esi + 0xc], eax
call sub.MSVCRT.dll__wcsdup
mov dword [esi + 0x38], eax
add esp, 0xc
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x24], eax
test al, 1
je 0x402ebd
lea eax, [ebp + 8]
push eax
push edi
push esi
push 0x403046
push 0x10000
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x402eb5
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, esi
jmp 0x402ecd
push esi
call fcn.00403097
jmp 0x402ecc
push esi
call fcn.00402ee7
push esi
mov edi, eax
call fcn.00403097
pop ecx
pop ecx
pop esi
mov eax, edi
pop edi
pop ebp
ret 0x10
Function at 0x402ee7
Capabilities:
Delete file

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
mov esi, dword [esp + 0x18]
xor ebx, ebx
push edi
mov ebp, dword [esi + 0xc]
push dword [esi + 8]
mov dword [esp + 0x18], ebp
call fcn.0043b250
push dword [esi + 0x38]
mov dword [esp + 0x20], eax
call fcn.0043b250
mov dword [esp + 0x10], eax
call fcn.00405d40
mov edi, eax
test edi, edi
je 0x40301c
push ebx
push pe_nt_image_headers32
push 2
push ebx
push 1
push 0xc0000000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x403007
test byte [esi + 0x24], 2
mov dword [esi + 0x10], ebp
jne 0x402f59
push 1
push 0x34
push edi
call fcn.00408c90
add esp, 0xc
mov eax, dword [0x4460d8]
test eax, eax
je 0x402f71
push eax
push 0x2714
push edi
call fcn.00408c90
add esp, 0xc
mov eax, dword [0x4460dc]
test eax, eax
je 0x402fa2
cmp dword [0x4460e0], ebx
je 0x402fa2
push eax
push 0x27bf
push edi
call fcn.00408c90
push dword [0x4460e0]
push 0x27c0
push edi
call fcn.00408c90
add esp, 0x18
push dword [esp + 0x1c]
push 0x2712
push edi
call fcn.00408c90
push dword [esp + 0x1c]
push 0x2722
push edi
call fcn.00408c90
push 0x403055
push 0x4e2b
push edi
call fcn.00408c90
push esi
push 0x2711
push edi
call fcn.00408c90
push edi
call fcn.00405de0
add esp, 0x34
test eax, eax
jne 0x402ff2
cmp dword [esi + 4], 0xfffffffb
je 0x402ff2
xor ebx, ebx
inc ebx
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x403007
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push edi
call fcn.00405d20
pop ecx
cmp ebx, 1
jne 0x40301c
mov dword [esi + 4], 0xfffffffe
jmp 0x40302b
xor ecx, ecx
cmp dword [esi + 4], 0xfffffffb
setne cl
add ecx, 0xfffffffc
mov dword [esi + 4], ecx
push dword [esp + 0x1c]
call fcn.0043b240
push dword [esp + 0x10]
call fcn.0043b240
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
pop ecx
pop ecx
ret

Function at 0x4038c6
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
cmp word [0x4460e4], 0
jne 0x403988
push edi
lea eax, [esp + 4]
push eax
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor edi, edi
inc edi
test eax, eax
jne 0x4038fb
mov word [0x4460e4], di
jmp 0x403903
xor eax, eax
mov word [0x4460e4], ax
push str.ws2_32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x446100], eax
test eax, eax
je 0x403987
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x43c068
push eax
call esi
push 0x43c074
push dword [0x446100]
mov dword [0x4460f0], eax
call esi
push str.getnameinfo
push dword [0x446100]
mov dword [0x4460f4], eax
call esi
push str.WSAStringToAddressA
push dword [0x446100]
mov dword [0x4460f8], eax
call esi
cmp dword [0x4460f0], 0
mov dword [0x4460fc], eax
pop esi
je 0x403987
cmp dword [0x4460f4], 0
je 0x403987
cmp dword [0x4460f8], 0
je 0x403987
test eax, eax
je 0x403987
mov dword [0x4460e8], edi
pop edi
movsx eax, word [0x4460e4]
add esp, 0x190
ret
Function at 0x4039ba
Capabilities:
Get disk information
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x45c
push esi
or esi, 0xffffffff
push edi
mov edi, esi
test eax, eax
je 0x403b02
xor ecx, ecx
cmp word [eax], cx
je 0x403b02
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x403a13
cmp eax, 3
jne 0x403a4d
cmp word [esp + 0xa], 0x3a
jne 0x403a4d
cmp eax, 2
jne 0x403a31
lea eax, [esp + 8]
push 0x43c0a4
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x403b02
push 0xfffffffffffffffe
pop edi
jmp 0x403b02
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x403a62
cmp ax, bx
jne 0x403a6c
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x403a55
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x403aab
test byte [esp + 0x21c], 0x10
je 0x403a92
push 0xfffffffffffffffe
pop edi
jmp 0x403aa2
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x403b00
cmp word [esp + 0x10], bp
jne 0x403ab9
cmp word [esp + 0x12], bp
je 0x403ad8
cmp word [esp + 0x10], bx
jne 0x403ac7
cmp word [esp + 0x12], bx
je 0x403ad8
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x403b00
cmp word [esp + 0x12], ax
jne 0x403b00
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x403aed
test al, 0x10
je 0x403b00
jmp 0x403afd
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x403b00
push 0xfffffffffffffffe
pop edi
pop ebp
pop ebx
mov eax, edi
mov edx, esi
pop edi
pop esi
add esp, 0x45c
ret 4

Function at 0x403ba0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x403bdc
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4
Function at 0x403e50
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push ebx
push dword [0x4464c4]
mov dword [esp + 0x10], 0
call fcn.00404d90
mov ebp, eax
test ebp, ebp
je 0x403fac
push esi
push edi
push ebx
call fcn.00404460
cmp dword [ebp + 4], 0
mov esi, eax
mov edi, edx
je 0x403e9c
push 4
lea eax, [esp + 0x1c]
push eax
push ebp
call fcn.004044d0
mov ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x403eb7
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x24]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x10]
cmp ecx, 2
jl 0x403ee5
lea edx, [esp + 0x18]
mov eax, 0xfeff
cmp word [edx], ax
jne 0x403ee5
add esi, 2
adc edi, 0
push edi
push esi
push ebx
call fcn.00404300
pop edi
pop esi
pop ebp
mov eax, 0x19
pop ebx
pop ecx
ret 4
cmp ecx, 3
jl 0x403f16
lea edx, [esp + 0x18]
cmp word [edx], 0xbbef
jne 0x403f16
cmp byte [edx + 2], 0xbf
jne 0x403f16
add esi, 3
adc edi, 0
push edi
push esi
push ebx
call fcn.00404300
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
pop ecx
ret 4
cmp ecx, 2
jl 0x403f44
lea edx, [esp + 0x18]
mov eax, 0xfffe
cmp word [edx], ax
jne 0x403f44
add esi, 2
adc edi, 0
push edi
push esi
push ebx
call fcn.00404300
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
pop ecx
ret 4
cmp ecx, 4
jl 0x403f97
lea eax, [esp + 0x18]
cmp dword [eax], 0xfeff
jne 0x403f70
add esi, 4
adc edi, 0
push edi
push esi
push ebx
call fcn.00404300
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
pop ecx
ret 4
lea eax, [esp + 0x18]
cmp dword [eax], 0xfffe0000
jne 0x403f97
add esi, 4
adc edi, 0
push edi
push esi
push ebx
call fcn.00404300
pop edi
pop esi
pop ebp
mov eax, 6
pop ebx
pop ecx
ret 4
push edi
push esi
push ebx
call fcn.00404300
pop edi
pop esi
pop ebp
mov eax, 0x18
pop ebx
pop ecx
ret 4
pop ebp
mov eax, 0x18
pop ebx
pop ecx
ret 4

Function at 0x4040d0
Capabilities:
Write file on windows

Disassembly:
push ecx
push dword [esp + 8]
mov dword [esp + 4], 0
push dword [0x4464c4]
call fcn.00404d90
test eax, eax
je 0x404119
cmp dword [eax + 4], 0
je 0x404103
push 2
lea ecx, [esp + 0x10]
push ecx
push eax
call fcn.00404aa0
pop ecx
ret 8
push 0
lea ecx, [esp + 4]
push ecx
push 2
lea ecx, [esp + 0x18]
push ecx
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp]
pop ecx
ret 8

Function at 0x404120
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x4464c4]
call fcn.00404d90
mov esi, eax
test esi, esi
je 0x40419f
cmp dword [esi + 4], 0
je 0x404170
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.004044d0
test eax, eax
je 0x404164
inc dword [esi + 0xc]
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4041aa
cmp dword [esp + 8], 0
je 0x4041aa
push 1
push 0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4
Function at 0x4041c0
Capabilities:
Write file on windows

Disassembly:
push ecx
mov edx, dword [esp + 0xc]
mov dword [esp], 0
test edx, edx
je 0x4042c8
cmp word [edx], 0
je 0x4042c8
mov ecx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0xc]
test ecx, ecx
jne 0x4041ee
mov ecx, dword [esi + 0x18]
push edi
cmp ecx, 0x19
jne 0x40424d
cmp dword [esi + 4], 0
mov ecx, edx
lea edi, [ecx + 2]
je 0x404220
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404200
sub ecx, edi
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push edx
push esi
call fcn.00404aa0
pop edi
pop esi
pop ecx
ret 0xc
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404220
sub ecx, edi
lea eax, [esp + 8]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
cmp ecx, 2
lea ecx, [esp + 0x14]
setne al
push ecx
dec eax
and eax, 0xfde9
push edx
push eax
call fcn.00404bb0
mov edi, eax
test edi, edi
je 0x404243
cmp dword [esi + 4], 0
je 0x40429b
push dword [esp + 0x14]
push edi
push esi
call fcn.00404aa0
push edi
push 0
push dword [0x4460c4]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x1c]
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push 0
push dword [0x4460c4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
pop ecx
ret 0xc

Function at 0x4042d0
Capabilities:
Write file on windows

Disassembly:
push dword [esp + 4]
push dword [0x4464c4]
call fcn.00404d90
test eax, eax
je 0x4042ec
mov dword [esp + 4], eax
jmp fcn.004041c0
xor eax, eax
ret 0xc
Function at 0x4044d0
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0
jne 0x4044f1
push esi
call fcn.00403ba0
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
cmp ebx, edi
jl 0x404565
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x404552
dec ecx
je 0x40453d
sub ecx, 2
je 0x40452a
push edi
push eax
push dword [esp + 0x1c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x14]
mov word [eax], cx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
mov eax, edi
mov byte [ecx], dl
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebx
add eax, dword [esi + 4]
push ebx
push eax
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x4045aa
lea eax, [esp + 0x18]
push eax
push edi
push ebp
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
add eax, ebx
pop esi
pop ebx
ret 0xc
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x4045cb
mov edi, eax
push edi
push dword [esi + 4]
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
lea eax, [ebx + edi]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x4045f0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x4460c4]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x404774
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x40463e
test ebp, ebp
je 0x4046e0
dec ebp
cmp dword [ebx + 4], 0
je 0x404657
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.004044d0
mov dword [esp + 0x14], eax
jmp 0x404671
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x4046e0
test cl, cl
je 0x404685
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x4046c0
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x4460c4]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x4046e0
cmp dword [esp + 0x2c], 0
jne 0x404630
cmp cl, 0xd
je 0x4046e7
cmp cl, 0xa
jne 0x404630
dec esi
jmp 0x404757
cmp dword [esp + 0x2c], 0
jne 0x404757
cmp cl, 0xa
jne 0x4046ef
dec esi
jmp 0x404757
cmp cl, 0xd
jne 0x404757
dec esi
cmp dword [ebx + 4], 0
je 0x40470e
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.004044d0
mov dword [esp + 0x14], eax
jmp 0x404724
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x404757
cmp dword [ebx + 4], 0
je 0x404736
inc dword [ebx + 0xc]
jmp 0x404757
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x404780
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push 0x1000
push 0
push dword [0x4460c4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [esp + 8], ecx
test ecx, ecx
je 0x40492d
mov ax, word [esp]
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x2c]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], 0x1000
mov dword [esp + 0x1c], 0x7ff
cmp ebp, 0xffffffff
je 0x4047d4
test ebp, ebp
je 0x40488d
dec ebp
cmp dword [ebx + 4], 0
je 0x4047ed
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.004044d0
mov dword [esp + 0x14], eax
jmp 0x404807
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
cmp eax, 2
mov ax, word [esp + 0x10]
jne 0x40488d
test ax, ax
je 0x404821
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov esi, edi
mov edx, dword [esp + 0x1c]
sub esi, ecx
sar esi, 1
cmp esi, edx
jle 0x404868
mov eax, dword [esp + 0x20]
add edx, 0x800
add eax, 0x1000
mov dword [esp + 0x1c], edx
push eax
push ecx
push 8
push dword [0x4460c4]
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
mov ax, word [esp + 0x10]
mov dword [esp + 0x18], ecx
lea edi, [ecx + esi*2]
test ax, ax
je 0x40488d
cmp dword [esp + 0x30], 0
jne 0x4047c6
cmp ax, 0xd
je 0x404894
cmp ax, 0xa
jne 0x4047c6
sub edi, 2
jmp 0x40490c
cmp dword [esp + 0x30], 0
jne 0x40490c
cmp ax, 0xa
jne 0x40489f
sub edi, 2
jmp 0x40490c
cmp ax, 0xd
jne 0x40490c
sub edi, 2
cmp dword [ebx + 4], 0
je 0x4048c1
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.004044d0
mov dword [esp + 0x14], eax
jmp 0x4048d7
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x10], 0xa
je 0x40490c
cmp dword [ebx + 4], 0
je 0x4048eb
add dword [ebx + 0xc], 2
jmp 0x40490c
push 1
lea eax, [esp + 0x28]
mov dword [esp + 0x24], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x38]
mov ecx, edi
sub ecx, dword [esp + 0x18]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
xor eax, eax
add esp, 0x18
ret 0x10
Function at 0x404940
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x4460c4]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x404a90
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 3]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, edx
cmp edi, 0xffffffff
je 0x40498c
test edi, edi
je 0x4049fd
dec edi
push esi
push ebp
call fcn.00404c20
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40499f
xor cl, cl
jmp 0x4049a1
mov cl, byte [esi]
mov edx, dword [esp + 0x1c]
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, edx
mov byte [esp + 0x13], cl
add eax, 0xfffffffb
cmp ebx, eax
jle 0x4049e4
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x4460c4]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [ebx + edx]
mov eax, dword [esp + 0x2c]
test cl, cl
je 0x4049fd
test eax, eax
jne 0x404982
cmp cl, 0xd
je 0x404a01
cmp cl, 0xa
jne 0x404982
dec esi
jmp 0x404a73
test eax, eax
jne 0x404a73
cmp cl, 0xa
jne 0x404a09
dec esi
jmp 0x404a73
cmp cl, 0xd
jne 0x404a73
dec esi
cmp dword [ebp + 4], 0
je 0x404a28
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.004044d0
mov dword [esp + 0x20], eax
jmp 0x404a3f
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x404a73
cmp dword [ebp + 4], 0
je 0x404a51
inc dword [ebp + 0xc]
jmp 0x404a73
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebp]
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x404aa0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
mov dword [esp + 4], 0
cmp dword [esi + 0x1c], 0
jne 0x404ba7
cmp dword [esi + 0x14], 1
jne 0x404aeb
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0xc]
push 1
neg eax
cdq
push ecx
push eax
push dword [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
push edi
mov edi, dword [esp + 0x20]
cmp eax, edi
jle 0x404b68
mov ecx, dword [esi + 8]
add ecx, dword [esi + 4]
sub ecx, eax
mov eax, edi
dec eax
je 0x404b53
dec eax
je 0x404b3c
sub eax, 2
je 0x404b27
push edi
push dword [esp + 0x20]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov ax, word [eax]
mov word [ecx], ax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov al, byte [eax]
mov byte [ecx], al
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
push esi
call fcn.00403ba0
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x404b95
push 0
lea eax, [esp + 0xc]
push eax
push edi
push dword [esp + 0x28]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
add esp, 0xc
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
push edi
push dword [esp + 0x20]
add ecx, eax
jmp 0x404b11
xor eax, eax
pop esi
add esp, 0xc
ret 0xc