joyce8/EMBER2024-capa huggingface dataset:
Function at 0x432d18
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffeec
push ebx
push esi
push edi
mov ebx, edx
mov esi, eax
test byte [esi + 0x1c], 0x10
je 0x432d64
mov eax, esi
call fcn.0044828c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x432d64
mov eax, dword [ebp - 0x14]
cmp dword [eax + 0x250], 0
je 0x432d64
mov ecx, ebx
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x250]
mov edx, esi
mov edi, dword [eax]
call dword [edi + 0x24]
test al, al
jne 0x432ea3
mov eax, dword [ebx]
cmp eax, 0x100
jb 0x432da4
cmp eax, 0x108
ja 0x432da4
mov eax, esi
call fcn.0044828c
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x432e9a
mov ecx, ebx
mov edx, esi
mov eax, dword [ebp - 0x14]
mov edi, dword [eax]
call dword [edi + 0xf0]
test al, al
jne 0x432ea3
jmp 0x432e9a
mov eax, dword [ebx]
cmp eax, 0x200
jb 0x432e83
cmp eax, 0x20a
ja 0x432e83
test byte [esi + 0x50], 0x80
jne 0x432dd6
sub eax, 0x203
je 0x432dd3
sub eax, 3
je 0x432dd3
sub eax, 3
jne 0x432dd6
sub dword [ebx], 2
mov eax, dword [ebx]
sub eax, 0x200
je 0x432dea
dec eax
je 0x432dff
dec eax
je 0x432e1c
dec eax
je 0x432dff
jmp 0x432e23
mov ecx, ebx
mov eax, dword [0x45c10c]
mov eax, dword [eax]
mov edx, esi
call fcn.00451a38
jmp 0x432e9a
cmp byte [esi + 0x5d], 1
jne 0x432e15
mov eax, esi
mov si, 0xffed
call fcn.00403370
jmp 0x432ea3
or word [esi + 0x54], 1
jmp 0x432e9a
and word [esi + 0x54], 0xfffe
jmp 0x432e9a
mov eax, dword [0x45db14]
cmp byte [eax + 0x20], 0
je 0x432e9a
mov eax, dword [0x45db14]
cmp dword [eax + 0x1c], 0
je 0x432e9a
mov eax, dword [ebx]
mov edx, dword [0x45db14]
cmp eax, dword [edx + 0x1c]
jne 0x432e9a
lea eax, [ebp - 0x114]
push eax
call sub.user32.dll_GetKeyboardState
mov eax, dword [ebx]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x114]
call fcn.004481d0
mov byte [ebp - 0xc], al
mov ax, word [ebx + 4]
mov word [ebp - 0xa], ax
mov eax, dword [ebx + 8]
mov dword [ebp - 8], eax
lea edx, [ebp - 0x10]
mov eax, esi
mov si, 0xffc9
call fcn.00403370
jmp 0x432ea3
cmp eax, 0xb00b
jne 0x432e9a
mov edx, dword [ebx + 8]
push edx
mov ecx, dword [ebx + 4]
mov edx, eax
mov eax, esi
call fcn.00431654
mov edx, ebx
mov eax, esi
mov ecx, dword [eax]
call dword [ecx - 0x14]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x43c93c
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov eax, dword [0x45c290]
cmp byte [eax + 0xc], 0
je 0x43caa9
push 0x8000
call sub.kernel32.dll_SetErrorMode
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x43caa2
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x45db68], 0
jne 0x43c990
push 0x43cab0
call sub.kernel32.dll_GetModuleHandleA_2
mov ebx, eax
push 0x43cab8
push ebx
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db68], eax
cmp dword [0x45bb10], 0
jne 0x43ca8b
push 0x43cac8
call sub.kernel32.dll_LoadLibraryA
mov dword [0x45bb10], eax
cmp dword [0x45bb10], 0
je 0x43ca8b
push 0x43cad4
mov eax, dword [0x45bb10]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db6c], eax
push 0x43cae4
mov eax, dword [0x45bb10]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db70], eax
push 0x43caf8
mov eax, dword [0x45bb10]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db74], eax
push 0x43cb10
mov eax, dword [0x45bb10]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db78], eax
push 0x43cb28
mov eax, dword [0x45bb10]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db7c], eax
push 0x43cb3c
mov eax, dword [0x45bb10]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db80], eax
push 0x43cb54
mov eax, dword [0x45bb10]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db84], eax
push 0x43cb6c
mov eax, dword [0x45bb10]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db88], eax
push 0x43cb88
mov eax, dword [0x45bb10]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db8c], eax
push 0x43cb94
mov eax, dword [0x45bb10]
push eax
call sub.kernel32.dll_GetProcAddress_1
mov dword [0x45db90], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x43caa9
mov eax, dword [ebp - 4]
push eax
call sub.kernel32.dll_SetErrorMode
ret
pop ebx
pop ecx
pop ebp
ret

Function at 0x440934
Capabilities:
Log keystrokes
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
mov ebx, edx
mov word [ebp - 2], ax
mov eax, ebx
call fcn.00403ec4
push 0
xor eax, eax
mov al, byte [ebp - 2]
push eax
call sub.user32.dll_MapVirtualKeyA
shl eax, 0x10
test eax, eax
je 0x440983
push pe_nt_image_headers32
lea edx, [ebp - 0x102]
push edx
push eax
call sub.user32.dll_GetKeyNameTextA
mov eax, ebx
lea edx, [ebp - 0x102]
mov ecx, pe_nt_image_headers32
call fcn.00404134
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x448140
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
push esi
mov esi, eax
mov bl, byte [0x448190]
test si, 4
je 0x448154
or bl, 1
test si, 8
je 0x44815e
or bl, 4
test si, 1
je 0x448168
or bl, 8
test si, 2
je 0x448172
or bl, 0x10
test si, 0x10
je 0x44817c
or bl, 0x20
push 0x12
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x44818b
or bl, 2
mov eax, ebx
pop esi
pop ebx
ret
Function at 0x448194
Capabilities:
Log keystrokes via polling

Disassembly:
push ebx
push esi
mov esi, eax
mov bl, byte [0x4481cc]
push 0x10
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x4481ad
or bl, 1
push 0x11
call sub.user32.dll_GetKeyState
test ax, ax
jge 0x4481bc
or bl, 4
test esi, 0x20000000
je 0x4481c7
or bl, 2
mov eax, ebx
pop esi
pop ebx
ret

Function at 0x44e874
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
test dl, dl
je 0x44e886
add esp, 0xfffffff0
call fcn.00403498
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call fcn.0041ca7c
mov eax, dword [0x45bf2c]
mov dword [eax + 4], ebx
mov dword [eax], 0x44ec18
mov eax, dword [0x45bf38]
mov dword [eax + 4], ebx
mov dword [eax], 0x44ec24
mov eax, ebx
call fcn.0044ec30
push 0
call sub.user32.dll_GetKeyboardLayout
mov dword [ebx + 0x3c], eax
mov dl, 1
mov eax, dword [0x414d74]
call fcn.00403144
mov dword [ebx + 0x4c], eax
mov dl, 1
mov eax, dword [0x414d74]
call fcn.00403144
mov dword [ebx + 0x50], eax
mov dl, 1
mov eax, dword [0x414d74]
call fcn.00403144
mov dword [ebx + 0x54], eax
mov dl, 1
mov eax, dword [0x414d74]
call fcn.00403144
mov dword [ebx + 0x58], eax
mov dl, 1
mov eax, dword [0x414d74]
call fcn.00403144
mov dword [ebx + 0x7c], eax
push 0
call sub.user32.dll_GetDC
mov esi, eax
push 0x5a
push esi
call sub.gdi32.dll_GetDeviceCaps
mov dword [ebx + 0x40], eax
push esi
push 0
call sub.user32.dll_ReleaseDC
mov eax, dword [ebx + 0x58]
push eax
mov eax, 0x44b04c
push eax
push 0
push 0
mov eax, dword [0x45c088]
mov eax, dword [eax]
call eax
mov dl, 1
mov eax, dword [0x41e4d0]
call fcn.0041fc0c
mov dword [ebx + 0x84], eax
mov dl, 1
mov eax, dword [0x41e4d0]
call fcn.0041fc0c
mov dword [ebx + 0x88], eax
mov dl, 1
mov eax, dword [0x41e4d0]
call fcn.0041fc0c
mov dword [ebx + 0x80], eax
mov eax, ebx
call fcn.0044f050
mov eax, dword [ebx + 0x84]
mov dword [eax + 0xc], ebx
mov dword [eax + 8], 0x44ef2c
mov eax, dword [ebx + 0x88]
mov dword [eax + 0xc], ebx
mov dword [eax + 8], 0x44ef2c
mov eax, dword [ebx + 0x80]
mov dword [eax + 0xc], ebx
mov dword [eax + 8], 0x44ef2c
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x44e9c3
call fcn.004034f0
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
pop ecx
pop ebp
ret
Function at 0x44f958
Capabilities:
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
push esi
test dl, dl
je 0x44f96f
add esp, 0xfffffff0
call fcn.00403498
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call fcn.0041ca7c
mov eax, dword [0x45c074]
cmp word [eax + 2], 0
jne 0x44f997
mov eax, dword [0x45c074]
mov dword [eax + 4], ebx
mov dword [eax], fcn.00451030
mov eax, dword [0x45c128]
cmp word [eax + 2], 0
jne 0x44f9b1
mov eax, dword [0x45c128]
mov dword [eax + 4], ebx
mov dword [eax], fcn.00451228
mov byte [ebx + 0x34], 0
mov dl, 1
mov eax, dword [0x414d74]
call fcn.00403144
mov dword [ebx + 0x90], eax
mov dl, 1
mov eax, dword [0x414d74]
call fcn.00403144
mov dword [ebx + 0xa8], eax
xor eax, eax
mov dword [ebx + 0x60], eax
xor eax, eax
mov dword [ebx + 0x84], eax
mov dword [ebx + 0x5c], 0xff000018
mov dword [ebx + 0x78], 0x1f4
mov byte [ebx + 0x7c], 1
xor eax, eax
mov dword [ebx + 0x80], eax
mov dword [ebx + 0x74], 0x9c4
mov byte [ebx + 0x88], 0
mov byte [ebx + 0x9d], 1
mov byte [ebx + 0xb4], 1
mov dl, 1
mov eax, dword [0x41ef78]
call fcn.00426844
mov esi, eax
mov dword [ebx + 0x98], esi
push 0x44fb38
mov eax, dword [0x45bf90]
mov eax, dword [eax]
push eax
call sub.user32.dll_LoadIconA
mov edx, eax
mov eax, esi
call fcn.00426c14
mov eax, dword [ebx + 0x98]
mov dword [eax + 0x14], ebx
mov dword [eax + 0x10], 0x4517c8
push pe_nt_image_headers32
lea eax, [ebp - 0x101]
push eax
mov eax, dword [0x45bf90]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_GetModuleFileNameA_1
lea eax, [ebp - 0x101]
push eax
lea eax, [ebp - 0x101]
push eax
call sub.user32.dll_OemToCharA
lea eax, [ebp - 0x101]
mov dl, 0x5c
call fcn.0040c388
test eax, eax
je 0x44faa6
lea edx, [eax + 1]
lea eax, [ebp - 0x101]
call fcn.0040862c
lea eax, [ebp - 0x101]
mov dl, 0x2e
call fcn.0040c3b0
test eax, eax
je 0x44faba
mov byte [eax], 0
lea eax, [ebp - 0x101]
inc eax
push eax
call sub.user32.dll_CharLowerA
lea eax, [ebx + 0x8c]
lea edx, [ebp - 0x101]
mov ecx, pe_nt_image_headers32
call fcn.00404134
mov eax, dword [0x45be60]
cmp byte [eax], 0
jne 0x44faee
mov eax, ebx
call fcn.0044fc60
mov byte [ebx + 0x59], 1
mov byte [ebx + 0x5a], 1
mov byte [ebx + 0x5b], 1
mov byte [ebx + 0x9e], 1
xor eax, eax
mov dword [ebx + 0xa0], eax
mov eax, ebx
call fcn.004519a4
mov eax, ebx
call fcn.00452368
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x44fb2e
call fcn.004034f0
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x452880
Capabilities:
Get hostname

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffb8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x48], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
lea eax, [ebp - 0x10]
mov edx, dword [0x414370]
call fcn.00404830
xor eax, eax
push ebp
push 0x4529c4
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [0x45bd44], 0
jne 0x4528d3
mov ecx, dword [0x45be70]
mov dl, 1
mov eax, dword [0x407024]
call fcn.0040b634
call fcn.00403900
lea eax, [ebp - 0x20]
xor ecx, ecx
mov edx, 0x10
call fcn.00402b88
mov eax, ebx
call fcn.00404700
mov dword [ebp - 0x1c], eax
push esi
push edi
mov esi, 0x4529d4
lea edi, [ebp - 0x30]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
pop edi
pop esi
lea eax, [ebp - 0x30]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0xc]
call fcn.004057b4
xor eax, eax
mov dword [ebp - 8], eax
mov eax, ebx
call fcn.00404710
test eax, eax
jle 0x45296b
mov dword [ebp - 4], 0x10
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x40]
push eax
call sub.kernel32.dll_GetComputerNameA
test eax, eax
je 0x452964
lea eax, [ebp - 0x44]
mov edx, ebx
call fcn.0040414c
mov eax, dword [ebp - 0x44]
push eax
lea eax, [ebp - 0x48]
lea edx, [ebp - 0x40]
mov ecx, 0x10
call fcn.00404134
mov eax, dword [ebp - 0x48]
pop edx
call fcn.00407e30
test eax, eax
jne 0x452964
mov ebx, 0x15
jmp 0x452970
mov ebx, 0x10
jmp 0x452970
mov ebx, 0x15
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 0x20]
push eax
push ebx
push 0
push esi
call dword [0x45bd44]
call fcn.004527d8
mov eax, dword [ebp - 8]
call fcn.004527d8
mov eax, edi
mov edx, dword [ebp - 0xc]
call fcn.004057cc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4529cb
lea eax, [ebp - 0x48]
mov edx, 2
call fcn.00403ee8
lea eax, [ebp - 0x10]
mov edx, dword [0x414370]
call fcn.00404900
ret
Function at 0x4016b0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], esp
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
nop
nop
nop
nop
cmp dword [ebp - 0xc], esp
je 0x4016e6
push 6
call fcn.00403166
add esp, 4
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x401705
push eax
mov ebx, eax
call fcn.00401000
inc eax
push eax
call fcn.0040315a
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x401716
push ebx
call fcn.00403154
add esp, 4
pop eax
mov dword [ebp - 4], eax
push 0x80000002
push 0
push 0
push 0
push 0
push 0
push 0x80000004
push 0
push 0x40f23d
push 0x80000004
push 0
mov eax, dword [ebp - 4]
test eax, eax
jne 0x40174b
mov eax, 0x40f232
push eax
push 4
mov ebx, 0x148
call fcn.004038e0
add esp, 0x34
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x401775
mov eax, 0x40f232
jmp 0x401831
push 0x80000004
push 0
mov eax, dword [ebp - 4]
test eax, eax
jne 0x401788
mov eax, 0x40f232
push eax
push 1
mov ebx, 0x130
call fcn.004039b0
add esp, 0x10
mov dword [ebp - 0xc], eax
fild dword [ebp - 8]
fstp qword [ebp - 0x14]
fld qword [ebp - 0x14]
fadd qword [0x40f240]
fstp qword [ebp - 0x1c]
fild dword [ebp - 0xc]
fstp qword [ebp - 0x24]
fld qword [ebp - 0x24]
fsub qword [ebp - 0x1c]
fstp qword [ebp - 0x2c]
fld qword [ebp - 0x2c]
call fcn.00401100
push 0x80000301
push 0
push eax
push 0x80000004
push 0
mov eax, dword [ebp - 4]
test eax, eax
jne 0x4017e2
mov eax, 0x40f232
push eax
push 2
mov ebx, 0x138
call fcn.00403a80
add esp, 0x1c
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x40180c
push ebx
call fcn.00403154
add esp, 4
pop eax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x40182c
push eax
mov ebx, eax
call fcn.00401000
inc eax
push eax
call fcn.0040315a
pop ecx
pop esi
mov edi, eax
rep movsb byte es:[edi], byte [esi]
jmp 0x401831
push eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x401842
push ebx
call fcn.00403154
add esp, 4
pop eax
mov esp, ebp
pop ebp
ret
Function at 0x40271f
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov dword [ebp - 4], 0
mov dword [ebp - 8], esp
push dword [ebp + 8]
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
nop
nop
nop
nop
cmp dword [ebp - 8], esp
je 0x40275b
push 6
call fcn.00403166
add esp, 4
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], esp
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
nop
nop
nop
nop
cmp dword [ebp - 0x10], esp
je 0x402785
push 6
call fcn.00403166
add esp, 4
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
je 0x40279e
mov dword [ebp - 4], 1
jmp 0x4027a5
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
jmp 0x4027ad
mov esp, ebp
pop ebp
ret 4

Function at 0x403b00
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, dword [esp + 8]
push edi
push 0
push 0x20
push 3
push 0
push 3
push 0x80000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x403b69
push ebx
lea ecx, [esp + 0x10]
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
lea edx, [ebx + 8]
push edx
call fcn.00403280
add esp, 4
mov esi, eax
lea eax, [esp + 0x14]
push 0
push eax
lea ecx, [esi + 8]
push ebx
push ecx
push edi
mov dword [esi], 1
mov dword [esi + 4], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop esi
pop ebx
pop edi
ret

Function at 0x403c70
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push esi
lea eax, [esp + 0x14]
push edi
push eax
mov dword [esp + 0x1c], 0x44
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov eax, dword [esp + 0x84]
xor edi, edi
cmp eax, edi
mov dword [esp + 0x54], edi
mov dword [esp + 0x58], edi
mov dword [esp + 0x44], 1
je case.0x403cb1.2
mov ecx, dword [esp + 0x7c]
lea eax, [ecx - 1]
cmp eax, 5
ja case.0x403cb1.2
jmp dword [eax*4 + 0x403d3c]
mov word [esp + 0x48], di
jmp 0x403cea
mov word [esp + 0x48], 2
jmp 0x403cea
mov word [esp + 0x48], 3
jmp 0x403cea
mov word [esp + 0x48], 4
jmp 0x403cea
mov word [esp + 0x48], 7
jmp 0x403cea
mov word [esp + 0x48], 5
lea edx, [esp + 8]
mov ecx, dword [esp + 0x64]
lea eax, [esp + 0x18]
push edx
push eax
push edi
push edi
push edi
push 1
push edi
push edi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
mov esi, eax
cmp esi, edi
je 0x403d34
cmp dword [esp + 0x70], edi
je 0x403d20
mov edx, dword [esp + 8]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [esp + 0xc]
push ecx
call edi
mov eax, esi
pop edi
pop esi
add esp, 0x54
ret
Function at 0x4044d0
Capabilities:
Get file size

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x4044de
or eax, 0xffffffff
pop esi
ret
push esi
call fcn.00405520
add esp, 4
test eax, eax
jne 0x4044f0
or eax, 0xffffffff
pop esi
ret
mov ecx, dword [esi]
or eax, 0xffffffff
cmp ecx, 1
jne 0x40450b
mov esi, dword [esi + 4]
lea eax, [esp + 0xc]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
pop esi
ret
cmp ecx, 2
jne 0x404518
mov ecx, dword [esi + 4]
call fcn.00405510
pop esi
ret

Function at 0x4045d0
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
test ebx, ebx
push edi
jne 0x4045e3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push ebx
call fcn.00405520
add esp, 4
test eax, eax
jne 0x4045f5
pop edi
pop esi
pop ebp
pop ebx
ret
mov edi, dword [esp + 0x24]
test edi, edi
jg 0x404604
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov eax, dword [ebx]
xor esi, esi
cmp eax, 1
jne 0x40465b
mov ebx, dword [ebx + 4]
push edi
call fcn.00405af1
add esp, 4
mov ebp, eax
lea eax, [esp + 0x18]
push esi
push eax
push edi
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40463e
push ebp
call fcn.00405bfe
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov ecx, dword [esp + 0x18]
push ecx
push ebp
call fcn.004054a0
push ebp
mov esi, eax
call fcn.00405bfe
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
cmp eax, 2
jne 0x40469d
mov ebx, dword [ebx + 4]
lea edx, [edi + 8]
push edx
call fcn.00403280
mov esi, eax
add esp, 4
lea ecx, [esi + 8]
mov dword [esi], 1
mov dword [esi + 4], edi
mov eax, dword [ebx]
push edi
push ecx
mov ecx, ebx
call dword [eax + 0x20]
test eax, eax
jne 0x40469a
push esi
call fcn.00403310
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [esi + 4], eax
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x4046b0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, dword [esp + 0x1c]
test esi, esi
push edi
jne 0x4046c9
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
push esi
call fcn.00405520
add esp, 4
test eax, eax
jne 0x4046de
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov ebp, dword [esp + 0x2c]
test ebp, ebp
jg 0x4046f0
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov eax, dword [esi]
mov dword [esp + 0x20], 0
cmp eax, 1
jne 0x4047ce
mov edi, dword [esi + 4]
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x10], ebx
jne 0x404727
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
push 0
push edi
mov dword [esp + 0x28], 1
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
sub esi, ebp
sub esi, ebx
test esi, esi
jle 0x4047bb
push esi
call fcn.00405af1
add esp, 4
mov ebx, eax
push 1
push 0
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call ebp
lea eax, [esp + 0x14]
push 0
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x404782
push ebx
call fcn.00405bfe
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov ecx, dword [esp + 0x10]
push 0
push 0
push ecx
push edi
call ebp
lea edx, [esp + 0x14]
push 0
push edx
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x4047a6
mov dword [esp + 0x20], eax
push ebx
call fcn.00405bfe
mov eax, dword [esp + 0x24]
add esp, 4
test eax, eax
je 0x404843
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
cmp eax, 2
jne 0x404843
mov esi, dword [esi + 4]
mov ecx, esi
mov eax, dword [esi]
call dword [eax + 0x14]
mov ecx, esi
mov ebx, eax
call fcn.00405510
mov edi, eax
mov dword [esp + 0x20], 1
sub edi, ebp
sub edi, ebx
test edi, edi
jle 0x40483b
mov edx, dword [esi]
push 1
push ebp
mov ecx, esi
call dword [edx + 0x18]
push edi
call fcn.00405af1
add esp, 4
mov ebp, eax
mov eax, dword [esi]
mov ecx, esi
push edi
push ebp
call dword [eax + 0x20]
mov edx, dword [esi]
push 0
push ebx
mov ecx, esi
call dword [edx + 0x18]
mov eax, dword [esi]
push edi
push ebp
mov ecx, esi
call dword [eax + 0x24]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x14]
push ebp
mov ebx, eax
call fcn.00405bfe
add esp, 4
mov eax, dword [esi]
push ebx
mov ecx, esi
call dword [eax + 0x1c]
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
Function at 0x404850
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x14]
test esi, esi
jne 0x404863
xor eax, eax
pop esi
add esp, 8
ret
push esi
call fcn.00405520
add esp, 4
test eax, eax
jne 0x404875
pop esi
add esp, 8
ret
mov eax, dword [esi]
push ebx
mov ebx, 1
push ebp
cmp eax, ebx
push edi
mov dword [esp + 0x10], 0
jne 0x4048ec
mov eax, dword [esp + 0x1c]
mov edi, dword [esi + 4]
cmp eax, ebx
mov dword [esp + 0x10], ebx
jle 0x40491e
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
lea esi, [esp + 0x2c]
mov eax, dword [esi]
lea edx, [esp + 0x14]
push 0
push edx
lea ecx, [eax + 8]
mov eax, dword [eax + 4]
push eax
push ecx
push edi
call ebp
test eax, eax
je 0x4048d8
mov eax, dword [esp + 0x1c]
inc ebx
add esi, 0xc
cmp ebx, eax
jl 0x4048a8
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret
pop edi
mov dword [esp + 0xc], 0
mov eax, dword [esp + 0xc]
pop ebp
pop ebx
pop esi
add esp, 8
ret
cmp eax, 2
jne 0x40491e
mov eax, dword [esp + 0x1c]
mov esi, dword [esi + 4]
cmp eax, ebx
mov dword [esp + 0x10], ebx
jle 0x40491e
lea edi, [esp + 0x2c]
lea ebx, [eax - 1]
mov eax, dword [edi]
mov edx, dword [esi]
mov ecx, dword [eax + 4]
add eax, 8
push ecx
push eax
mov ecx, esi
call dword [edx + 0x24]
add edi, 0xc
dec ebx
jne 0x404907
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret