joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40955d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x4356e0
cmp edx, dword [eax]
je 0x40957f
add eax, 8
inc ecx
cmp eax, 0x435770
jl 0x409570
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x4356e0]
jne 0x4096ad
mov eax, dword [0x435fdc]
cmp eax, 1
je 0x409687
test eax, eax
jne 0x4095b0
cmp dword [0x435634], 1
je 0x409687
cmp edx, 0xfc
je 0x4096ad
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4095e7
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0040a320
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00408860
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40962a
lea eax, [ebp - 0x1a4]
push eax
call fcn.00408860
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x40b4c8
push edi
call fcn.0040a510
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0040a320
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040a330
lea eax, [ebp - 0xa0]
push 0x40b4a8
push eax
call fcn.0040a330
push dword [esi + 0x4356e4]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040a330
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0040a484
add esp, 0x2c
pop edi
jmp 0x4096ad
lea eax, [ebp + 8]
lea esi, [esi + 0x4356e4]
push 0
push eax
push dword [esi]
call fcn.00408860
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x40184a
Capabilities:
Create process on windows

Disassembly:
xor eax, eax
push eax
mov eax, dword [0x40fe28]
push eax
push eax
push 3
call fcn.0040593f
lea eax, [esp + 4]
push eax
call fcn.0040b510
mov edx, dword [esp]
xor ecx, ecx
call fcn.0040b5f0
jne 0x4018a4
mov edx, dword [0x40f700]
push dword [0x40fe28]
call fcn.0040b590
mov edx, dword [esp + 4]
call fcn.0040b590
mov edx, 0x40e43c
call fcn.0040b590
lea eax, [esp + 4]
push eax
call fcn.0040b510
jmp 0x4018e4
mov edx, dword [0x40f700]
push dword [0x40fe28]
call fcn.0040b590
mov edx, 0x40e1c4
call fcn.0040b590
lea eax, [esp + 4]
push eax
call fcn.0040b510
push dword [esp]
push 0
call fcn.00409c00
and eax, eax
je 0x4018e4
push 0
call fcn.00409a50
push 5
push 0
push 0
push dword [esp + 0xc]
push str.open
push dword [0x40f730]
call sub.SHELL32.DLL_ShellExecuteW
xor eax, eax
push dword [esp]
call fcn.0040b630
add esp, 4
ret

Function at 0x401915
Capabilities:
Query environment variable

Disassembly:
xor eax, eax
push eax
push eax
push eax
mov eax, dword [esp + 0x14]
mov dword [0x40fe28], eax
mov edx, dword [esp + 0x10]
lea ecx, [esp]
call fcn.00404000
mov edx, dword [esp]
xor ecx, ecx
call fcn.0040b5f0
jne 0x4019c1
mov eax, dword [0x40fe28]
push eax
push eax
push 0x104
call fcn.00404250
lea eax, [esp + 0xc]
push eax
call fcn.0040b510
push 0x104
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [esp + 8]
push eax
call sub.KERNEL32.dll_ExpandEnvironmentStringsW
and eax, eax
je 0x4019c1
mov edx, dword [esp + 8]
push dword [0x40fe28]
call fcn.0040b590
lea eax, [esp + 4]
push eax
call fcn.0040b510
lea eax, [esp + 4]
push eax
mov eax, dword [esp + 0xc]
push eax
push 0x104
mov eax, dword [esp + 0xc]
push eax
call sub.KERNEL32.dll_GetFullPathNameW
and eax, eax
je 0x4019c1
mov edx, dword [esp + 8]
push dword [0x40fe28]
call fcn.0040b590
lea eax, [esp + 4]
push eax
call fcn.0040b510
mov edx, dword [esp]
push dword [0x40fe28]
call fcn.0040b590
pop eax
add eax, dword [0x40e620]
jmp 0x4019e8
push dword [esp]
call fcn.0040b630
push dword [esp + 8]
call fcn.0040b630
add esp, 0xc
ret 4
Function at 0x402a61
Capabilities:
Create process on windows

Disassembly:
xor eax, eax
push eax
mov eax, dword [0x40fe28]
push eax
push eax
push 5
call fcn.0040593f
push 0x40f6f8
call fcn.0040b510
mov eax, dword [0x40fe28]
push eax
push eax
push dword [0x40fe28]
push 7
call fcn.0040593f
mov edx, dword [0x40e620]
add dword [esp], edx
call fcn.00401915
push 0x40f708
call fcn.0040b510
mov eax, dword [0x40fe28]
push eax
push eax
push dword [0x40f708]
call fcn.00409723
add dword [0x40fe28], 2
mov edx, 0x40e010
pop ecx
mov dword [0x40fe28], ecx
add ecx, dword [0x40e620]
call fcn.0040b5f0
je 0x402b05
mov edx, dword [0x40f708]
push dword [0x40fe28]
call fcn.0040b590
mov edx, str..htm
call fcn.0040b590
push 0x40f708
call fcn.0040b510
mov eax, dword [0x40fe28]
push eax
push eax
push 3
call fcn.0040593f
push 0x40f704
call fcn.0040b510
mov edx, dword [0x40f700]
push dword [0x40fe28]
call fcn.0040b590
mov edx, dword [0x40f704]
call fcn.0040b590
mov edx, 0x40e43c
call fcn.0040b590
push 0x40f744
call fcn.0040b510
mov edx, dword [0x40f6f8]
xor ecx, ecx
call fcn.0040b5f0
jne 0x402c06
push dword [0x40f708]
push 2
call fcn.00409c00
and eax, eax
je 0x402bea
push 2
push 2
call fcn.0040a220
call fcn.00402c1b
mov dword [esp], eax
push 2
call fcn.0040a360
push 2
call fcn.00409a50
cmp dword [esp], 0
je 0x402bbd
push 0xc
call fcn.004059a6
and eax, eax
je 0x402bbd
mov eax, 1
jmp 0x402bbf
xor eax, eax
and eax, eax
je 0x402be8
push 5
push 0x40e010
push 0x40e010
mov eax, dword [0x40f708]
push eax
push str.open
push dword [0x40f730]
call sub.SHELL32.DLL_ShellExecuteW
jmp 0x402c04
push 0
push str.error
push str.Cannot_make_product_file
push dword [0x40f730]
call sub.USER32.DLL_MessageBoxW
jmp 0x402c10
push 0
call sub.USER32.DLL_MessageBeep
mov eax, dword [esp]
jmp 0x402c17
add esp, 4
ret

Function at 0x405150
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
xor ebx, ebx
cmp dword [esp + 8], ebx
push esi
push edi
je 0x40519f
push dword [esp + 0x10]
push 0x4050cc
call dword [sym.imp.USER32.DLL_EnumWindows]
mov esi, dword [0x40f998]
cmp esi, ebx
je 0x4051f3
mov edi, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x405197
cmp byte [esi + 0x10], bl
je 0x405197
push 3
push ebx
push ebx
push ebx
push ebx
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
cmp edi, ebx
mov esi, edi
jne 0x405174
jmp 0x4051f3
mov esi, dword [0x40f998]
cmp esi, ebx
je 0x4051f3
push ebp
mov ebp, dword [esi]
lea edi, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi], eax
jne 0x4051ec
cmp byte [esi + 0x11], bl
je 0x4051c9
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_EnableWindow]
cmp byte [esi + 0x10], bl
je 0x4051df
push 3
push ebx
push ebx
push ebx
push ebx
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
push edi
push 0x40f998
call fcn.0040b445
pop ecx
pop ecx
cmp ebp, ebx
mov esi, ebp
jne 0x4051aa
pop ebp
pop edi
pop esi
pop ebx
ret 4
Function at 0x4052b2
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
push dword [0x40fe30]
call fcn.0040ae1c
or dword [ebp - 4], 0xffffffff
mov ebx, eax
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
movzx ecx, word [eax]
test cx, cx
je 0x405378
mov edx, dword [ebp + 8]
push 2
pop esi
cmp cx, 0x20
jne 0x4052f3
add eax, esi
cmp word [eax], 0x20
je 0x4052eb
movzx ecx, word [eax]
cmp cx, 0x22
mov dword [ebp - 8], 1
jne 0x40532f
add eax, esi
movzx ecx, word [eax]
test cx, cx
mov edi, eax
je 0x40532b
cmp cx, 0x22
je 0x40531f
add eax, esi
movzx ecx, word [eax]
test cx, cx
jne 0x40530f
cmp word [eax], 0
je 0x40532b
mov edx, eax
add eax, esi
jmp 0x405354
mov edx, eax
jmp 0x405354
test cx, cx
je 0x405350
mov edi, eax
cmp cx, 0x20
je 0x405346
add eax, esi
movzx ecx, word [eax]
test cx, cx
jne 0x405336
cmp word [eax], 0
mov edx, eax
je 0x405354
jmp 0x405327
and dword [ebp - 8], 0
mov ecx, dword [ebx]
cmp ecx, dword [ebp - 4]
jne 0x405362
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x405383
xor edi, edi
cmp dword [ebp - 8], edi
je 0x40536c
inc dword [ebp - 4]
movzx ecx, word [eax]
test cx, cx
jne 0x4052e5
cmp dword [ebp + 8], 0
jne 0x405393
mov eax, dword [ebp - 4]
jmp 0x405399
test edi, edi
je 0x405396
sub edx, edi
sar edx, 1
mov dword [ecx], edx
inc dword [ebx]
mov eax, edi
jmp 0x405399
mov ecx, dword [ebp + 8]
and dword [ecx], 0
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x40593f
Capabilities:
Get graphical window text

Disassembly:
push edi
push dword [esp + 8]
push dword [0x40fe6c]
call fcn.0040ad73
mov edi, eax
test edi, edi
je 0x4059a2
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x405968
push dword [esp + 0xc]
push edi
call eax
jmp 0x4059a2
push ebx
push esi
push dword [edi]
call dword [sym.imp.USER32.DLL_GetWindowTextLengthW]
push dword [esp + 0x14]
mov esi, eax
push esi
call fcn.0040b7f0
mov ebx, eax
and word [ebx], 0
lea eax, [esi + 1]
push eax
push ebx
push dword [edi]
call dword [sym.imp.USER32.DLL_GetWindowTextW]
push ebx
call sub.MSVCRT.dll_wcslen
pop ecx
sub esi, eax
push esi
call fcn.0040b8e0
pop esi
pop ebx
pop edi
ret 8
Function at 0x407b3f
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x10
push ebx
push esi
push edi
call dword [sym.imp.USER32.DLL_GetFocus]
mov esi, dword [sym.imp.USER32.DLL_GetKeyState]
mov edi, eax
test edi, edi
mov bl, pe_nt_image_headers32
je 0x407bba
push 9
call esi
test bl, al
je 0x407bba
push 0x11
call esi
test bl, al
jne 0x407bba
push 0x10
call esi
test bl, al
jne 0x407bba
push 0x12
call esi
test bl, al
jne 0x407bba
push 5
lea eax, [esp + 0x14]
push eax
push edi
call dword [sym.imp.USER32.DLL_GetClassNameW]
push 4
lea eax, [esp + 0x14]
push str.Rich
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x407bba
push eax
push eax
push 0x44e
push edi
call dword [sym.imp.USER32.DLL_SendMessageW]
test ax, 0x800
jne 0x407bba
xor eax, eax
jmp 0x407c3c
push ebp
mov ebp, dword [esp + 0x24]
test ebp, ebp
je 0x407be3
push 0x11
call esi
test bl, al
jne 0x407bdb
push 0x10
call esi
test bl, al
jne 0x407bdb
push 0x12
call esi
test bl, al
je 0x407be3
push 1
push ebp
call fcn.00407aed
test edi, edi
mov esi, dword [sym.imp.USER32.DLL_GetPropW]
je 0x407bf9
push str.PB_Hotkey
push edi
call esi
test eax, eax
jne 0x407c39
push str.PB_WindowID
push ebp
call esi
mov esi, eax
test esi, esi
je 0x407c39
lea eax, [esp + 0x10]
push eax
push ebp
call dword [sym.imp.USER32.DLL_GetWindowThreadProcessId]
test eax, eax
je 0x407c39
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x10], eax
jne 0x407c39
dec esi
push esi
push dword [0x40fe74]
call fcn.0040ad73
test eax, eax
je 0x407c39
mov eax, dword [eax + 8]
jmp 0x407c3b
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x10
ret 4
Function at 0x408a68
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push edi
push str.msimg32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
xor edi, edi
cmp eax, edi
mov dword [0x40fdbc], eax
je 0x408a99
push str.AlphaBlend
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x40fdc0], eax
lea eax, [ebp - 0x114]
push eax
mov dword [0x40fdb8], 1
mov dword [ebp - 0x114], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x408ae9
cmp dword [ebp - 0x104], 1
je 0x408afa
cmp dword [ebp - 0x104], 2
jne 0x408ae9
cmp dword [ebp - 0x110], 5
jb 0x408afa
jne 0x408ae9
cmp dword [ebp - 0x10c], edi
jne 0x408ae9
mov dword [0x40fdb8], edi
cmp dword [0x40fdb8], edi
je 0x408b00
call fcn.004089af
test eax, eax
jne 0x408b00
mov dword [0x40fdb8], edi
pop edi
leave
ret

Function at 0x409868
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push esi
push edi
xor edi, edi
cmp dword [0x40fdc4], edi
jne 0x409893
push fcn.00409835
push 0x10
push 0x258
call fcn.0040add3
mov dword [0x40fdc4], eax
mov esi, dword [ebp + 0xc]
cmp esi, edi
jne 0x40989f
mov esi, 0x40d01c
push 0x104
lea eax, [ebp - 0x20c]
push esi
push eax
call sub.MSVCRT.dll_wcsncpy
push esi
mov word [ebp - 4], di
call sub.MSVCRT.dll_wcslen
add esp, 0x10
cmp eax, edi
je 0x4098dd
cmp word [esi + eax*2 - 2], 0x5c
je 0x4098dd
lea eax, [ebp - 0x20c]
push 0x40d270
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
mov eax, dword [ebp + 0x10]
cmp eax, edi
je 0x4098e9
cmp word [eax], di
jne 0x4098ee
mov eax, 0x40d268
push eax
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
push dword [ebp + 8]
push dword [0x40fdc4]
call fcn.0040aceb
mov esi, eax
lea eax, [esi + 8]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
mov dword [esi], eax
je 0x40992a
mov dword [esi + 4], edi
jmp 0x40993c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x409940
mov dword [esi + 4], 1
mov edi, esi
jmp 0x409954
cmp dword [ebp + 8], 0xffffffff
jne 0x409952
push esi
push dword [0x40fdc4]
call fcn.0040ad98
mov dword [esi], edi
mov eax, edi
pop edi
pop esi
leave
ret 0xc

Function at 0x409a10
Capabilities:
Write file on windows

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

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
xor eax, eax
test esi, esi
mov dword [esp + 4], eax
je 0x409ce6
cmp word [esi], ax
je 0x409ce6
mov eax, dword [esp + 0xc]
mov ecx, dword [0x40ff14]
push edi
push eax
push ecx
call fcn.0040ad73
mov edi, eax
test edi, edi
je 0x409ce1
lea edx, [esp + 0x14]
push edx
push esi
push 0xfde9
call fcn.0040a450
mov esi, eax
test esi, esi
je 0x409ce1
cmp dword [edi + 4], 0
je 0x409cbb
mov eax, dword [esp + 0x14]
push eax
push esi
push edi
call fcn.0040a4b0
mov dword [esp + 8], eax
jmp 0x409cd1
mov edx, dword [esp + 0x14]
mov eax, dword [edi]
push 0
lea ecx, [esp + 0xc]
push ecx
push edx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [0x40f6e4]
push esi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 8
Function at 0x409fa0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
mov ecx, dword [0x40ff14]
push esi
push eax
push ecx
mov dword [esp + 0xc], 0
call fcn.0040ad73
mov esi, eax
test esi, esi
je 0x40a024
cmp dword [esi + 4], 0
je 0x409ff3
push 1
lea edx, [esp + 8]
push edx
push esi
call fcn.0040a640
test eax, eax
je 0x409fe7
add dword [esi + 0xc], 1
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
mov edx, dword [esi]
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea ecx, [esp + 0x1c]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40a02f
cmp dword [esp + 8], 0
je 0x40a02f
mov eax, dword [esi]
push 1
push 0
push 0xffffffffffffffff
push eax
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 0x40a130
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
mov ecx, dword [0x40ff14]
push esi
push eax
push ecx
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 0
call fcn.0040ad73
mov esi, eax
test esi, esi
je 0x40a20e
mov eax, dword [esp + 0x14]
test eax, eax
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
je 0x40a1c6
cmp word [eax], 0
je 0x40a1c6
push edi
lea edx, [esp + 0x18]
push edx
push eax
push 0xfde9
call fcn.0040a450
mov edi, eax
test edi, edi
je 0x40a1c5
cmp dword [esi + 4], 0
je 0x40a1a3
mov eax, dword [esp + 0x18]
push eax
push edi
push esi
call fcn.0040a4b0
mov dword [esp + 0xc], eax
jmp 0x40a1b5
mov edx, dword [esp + 0x18]
mov eax, dword [esi]
push 0
lea ecx, [esp + 0x10]
push ecx
push edx
push edi
push eax
call ebx
mov ecx, dword [0x40f6e4]
push edi
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop edi
cmp dword [esi + 4], 0
je 0x40a1e9
push 2
push 0x40d284
push esi
call fcn.0040a4b0
mov ecx, eax
mov eax, dword [esp + 8]
pop ebx
add eax, ecx
pop esi
add esp, 8
ret 8
mov eax, dword [esi]
push 0
lea edx, [esp + 0x10]
push edx
push 2
push 0x40d284
push eax
call ebx
mov ecx, dword [esp + 0xc]
mov eax, dword [esp + 8]
pop ebx
add eax, ecx
pop esi
add esp, 8
ret 8
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 8
Function at 0x40a220
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x40ff14]
push eax
push ecx
call fcn.0040ad73
test eax, eax
je case.0x40a249.3
mov ecx, dword [esp + 8]
add ecx, 0xfffffffe
cmp ecx, 7
ja case.0x40a249.3
jmp dword [ecx*4 + 0x40a340]
cmp dword [eax + 4], 0
je 0x40a266
push 2
push 0x40d298
push eax
call fcn.0040a4b0
ret 8
mov eax, dword [eax]
push 0
lea edx, [esp + 8]
push edx
push 2
push 0x40d298
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x40a296
push 3
push 0x40d294
push eax
call fcn.0040a4b0
ret 8
mov edx, dword [eax]
push 0
lea ecx, [esp + 8]
push ecx
push 3
push 0x40d294
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x40a2c6
push 2
push 0x40d290
push eax
call fcn.0040a4b0
ret 8
mov edx, dword [eax]
push 0
lea ecx, [esp + 8]
push ecx
push 2
push 0x40d290
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x40a2f6
push 4
push 0x40d288
push eax
call fcn.0040a4b0
ret 8
mov edx, dword [eax]
push 0
lea ecx, [esp + 8]
push ecx
push 4
push 0x40d288
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x40a326
push 4
push 0x40d274
push eax
call fcn.0040a4b0
ret 8
mov edx, dword [eax]
push 0
lea ecx, [esp + 8]
push ecx
push 4
push 0x40d274
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8

Function at 0x40a360
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
mov ecx, dword [0x40ff14]
push esi
push eax
push ecx
xor esi, esi
call fcn.0040ad73
test eax, eax
je 0x40a382
pop esi
mov dword [esp + 4], eax
jmp fcn.00409a10
mov eax, esi
pop esi
ret 4
Function at 0x40a4b0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 1
push edi
mov dword [esp + 8], 0
jne 0x40a4e5
mov eax, dword [esi + 0xc]
mov ecx, dword [esi]
push 1
push 0
neg eax
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], edx
mov ecx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ecx, edi
jle 0x40a55e
mov eax, dword [esi + 8]
add eax, dword [esi + 4]
sub eax, ecx
mov ecx, edi
sub ecx, 1
je 0x40a54b
sub ecx, 1
je 0x40a536
sub ecx, 2
je 0x40a523
mov ecx, dword [esp + 0x14]
push edi
push ecx
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov ecx, dword [edx]
mov dword [eax], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cx, word [edx]
mov word [eax], cx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
mov edx, dword [esp + 0x14]
mov cl, byte [edx]
mov byte [eax], cl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
push esi
call fcn.00409a10
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x40a58b
mov eax, dword [esp + 0x14]
mov ecx, dword [esi]
push 0
lea edx, [esp + 0xc]
push edx
push edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
mov edx, dword [esp + 0x14]
push edi
push edx
add ecx, eax
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ecx
ret 0xc
Function at 0x40a640
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
cmp dword [esi + 0x14], 0
push edi
jne 0x40a661
push esi
call fcn.00409a10
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
cmp ebx, edi
jl 0x40a6da
mov eax, dword [esi + 0x10]
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
sub ecx, 1
je 0x40a6c7
sub ecx, 1
je 0x40a6b2
sub ecx, 2
je 0x40a69f
push edi
push eax
mov eax, dword [esp + 0x1c]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov edx, dword [esp + 0x14]
mov dword [edx], ecx
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ax, word [eax]
mov ecx, dword [esp + 0x14]
mov word [ecx], ax
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov dl, byte [eax]
mov eax, dword [esp + 0x14]
mov byte [eax], dl
sub dword [esi + 0xc], edi
mov eax, edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esi + 0x10]
push ebp
mov ebp, dword [esp + 0x18]
sub ecx, ebx
add ecx, dword [esi + 4]
push ebx
push ecx
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
cmp edi, eax
push 0
jl 0x40a723
mov eax, dword [esi]
lea edx, [esp + 0x18]
push edx
push edi
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
pop esi
add eax, ebx
pop ebx
ret 0xc
mov edx, dword [esi + 4]
lea ecx, [esp + 0x18]
push ecx
push eax
mov eax, dword [esi]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
cmp edi, eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
jle 0x40a746
mov edi, eax
mov ecx, dword [esi + 4]
push edi
push ecx
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
add esp, 0xc
pop ebp
lea eax, [ebx + edi]
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x40a770
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [0x40f6e4]
sub esp, 0xc
push esi
push edi
push 0x1000
xor esi, esi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x40a8cb
push ebx
push ebp
mov ebx, edi
mov ebp, 0x1000
mov dword [esp + 0x18], 0x7ff
mov esi, dword [esp + 0x20]
cmp dword [esi + 4], 0
je 0x40a7c1
push 2
lea ecx, [esp + 0x14]
push ecx
push esi
call fcn.0040a640
mov dword [esp + 0x14], eax
jmp 0x40a7d8
mov ecx, dword [esi]
push 0
lea edx, [esp + 0x18]
push edx
push 2
lea eax, [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0x14], 2
mov ax, word [esp + 0x10]
jne 0x40a847
test ax, ax
je 0x40a7f4
mov word [ebx], ax
mov ax, word [esp + 0x10]
add ebx, 2
mov esi, ebx
sub esi, edi
sar esi, 1
cmp esi, dword [esp + 0x18]
jle 0x40a829
mov edx, dword [0x40f6e4]
add dword [esp + 0x18], 0x800
add ebp, 0x1000
push ebp
push edi
push 8
push edx
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edi, eax
mov ax, word [esp + 0x10]
lea ebx, [edi + esi*2]
test ax, ax
je 0x40a843
cmp ax, 0xd
je 0x40a843
cmp ax, 0xa
jne 0x40a7a4
sub ebx, 2
jmp 0x40a8ae
mov esi, dword [esp + 0x20]
cmp ax, 0xa
jne 0x40a852
sub ebx, 2
jmp 0x40a8ae
cmp ax, 0xd
jne 0x40a8ae
sub ebx, 2
cmp dword [esi + 4], 0
je 0x40a874
push 2
lea eax, [esp + 0x14]
push eax
push esi
call fcn.0040a640
mov dword [esp + 0x14], eax
jmp 0x40a88b
mov eax, dword [esi]
push 0
lea ecx, [esp + 0x18]
push ecx
push 2
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x10], 0xa
je 0x40a8ae
cmp dword [esi + 4], 0
je 0x40a89f
add dword [esi + 0xc], 2
jmp 0x40a8ae
mov ecx, dword [esi]
push 1
push 0
push 0xfffffffffffffffe
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x24]
mov edx, ebx
sub edx, edi
sar edx, 1
pop ebp
mov dword [eax], edx
mov word [ebx], 0
pop ebx
mov eax, edi
pop edi
pop esi
add esp, 0xc
ret 8
pop edi
mov eax, esi
pop esi
add esp, 0xc
ret 8