joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4471d0
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x486b73
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.0047a4df
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.0047fb78
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.00481094
test eax, eax
je 0x4472ec
mov ecx, dword [esp + 0x3c]
call fcn.0047fba5
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x4472b0
push edi
mov ecx, esi
call fcn.0047d210
mov ecx, esi
call fcn.00447450
cmp dword [esp + 0x38], 1
jne 0x4472e5
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.0047d34b
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x449d20
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x449d53
push esi
call fcn.0044ce30
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x449d4c
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x449dd9
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x449dc2
mov eax, dword [esi + 8]
test eax, eax
je 0x449d77
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x449dbe
cmp eax, 2
je 0x449dc2
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x449d6a
cmp eax, 3
je 0x449d9d
cmp eax, 1
jne 0x449d6a
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x449d6a
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x449d6a
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00449e00
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x449de8
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00449e00
add esp, 4
pop esi
ret
Function at 0x4594f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 0x14]
mov edx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x18]
imul eax, edi
add eax, edx
cmp edx, eax
mov dword [ebp - 0x14], eax
jae 0x459611
mov eax, dword [ebp + 0x10]
lea eax, [edx + eax*4]
push ebx
push esi
mov dword [ebp + 0x14], eax
mov esi, 0xffc03fc0
mov eax, 0xff00ff
cmp edx, dword [ebp + 0x14]
mov ecx, dword [ebp + 8]
mov dword [ebp - 4], ecx
jae 0x4595f5
mov ebx, dword [ebp + 0x14]
sub ebx, edx
dec ebx
shr ebx, 3
lea ecx, [edx + 4]
inc ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], ebx
mov edx, dword [ecx + edi]
mov edi, dword [edi + ecx - 4]
mov dword [ebp - 8], edi
shr edi, 2
and edi, esi
mov dword [ebp + 0x10], edx
mov edx, dword [ecx]
mov ecx, dword [ecx - 4]
mov ebx, ecx
shr ebx, 2
and ebx, esi
add ebx, edi
mov edi, dword [ebp + 0x10]
shr edi, 2
and edi, esi
add ebx, edi
mov edi, edx
shr edi, 2
and edi, esi
lea ebx, [ebx + edi - 0x7fff80]
mov edi, dword [ebp - 8]
and edi, eax
mov esi, ecx
and esi, eax
add esi, edi
mov edi, dword [ebp + 0x10]
and edi, eax
add esi, edi
mov edi, edx
and edi, eax
lea esi, [esi + edi + 0x20002]
mov edi, dword [ebp - 8]
shr ecx, 2
shr esi, 2
xor ebx, esi
shr edi, 2
mov esi, 0x3fc03fc0
and ecx, esi
and edi, esi
add ecx, edi
mov edi, dword [ebp + 0x10]
shr edi, 2
and edi, esi
add ecx, edi
mov edi, dword [ebp + 0x18]
shr edx, 2
and edx, esi
lea ecx, [ecx + edx + 0x800080]
and ebx, eax
xor ebx, ecx
mov ecx, dword [ebp - 4]
add dword [ebp - 4], 4
mov dword [ecx], ebx
mov ecx, dword [ebp - 0xc]
add ecx, 8
dec dword [ebp - 0x10]
mov dword [ebp - 0xc], ecx
mov esi, 0xffc03fc0
jne 0x459547
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x1c]
add dword [ebp + 8], ecx
lea ecx, [edi + edi]
add dword [ebp + 0x14], ecx
add edx, ecx
cmp edx, dword [ebp - 0x14]
mov dword [ebp + 0xc], edx
jb 0x459525
pop esi
pop ebx
xor eax, eax
pop edi
leave
ret 0x18

Function at 0x45a059
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push str.SoftwareMicrosoftDirect3D
push getpeername
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x45a0b0
push esi
lea eax, [ebp + 0x14]
push eax
push dword [ebp + 0x10]
lea eax, [ebp + 0x10]
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
pop esi
jne 0x45a0b0
mov eax, dword [ebp + 0x10]
cmp eax, dword [ebp + 8]
jne 0x45a0b0
xor eax, eax
inc eax
jmp 0x45a0b2
xor eax, eax
leave
ret 0x10
Function at 0x45a0db
Capabilities:
Get system information on windows
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push edi
lea eax, [ebp - 4]
push eax
push str.SoftwareMicrosoftDirect3D
push getpeername
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
xor edi, edi
test eax, eax
jne 0x45a149
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push edi
push 0x494514
push dword [ebp - 4]
mov dword [ebp - 8], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x45a140
cmp dword [ebp - 0xc], 4
jne 0x45a140
cmp dword [ebp - 0x10], edi
je 0x45a140
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [0x4b4b40], edi
xor eax, eax
jmp 0x45a188
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [0x4b4b40], edi
jge 0x45a183
lea eax, [ebp - 0x34]
push eax
mov dword [0x4b4b40], edi
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp word [ebp - 0x34], di
jne 0x45a183
cmp word [ebp - 0x14], 5
jb 0x45a183
call fcn.0045a0b6
test eax, eax
je 0x45a183
emms
mov dword [0x4b4b40], 1
mov eax, dword [0x4b4b40]
pop edi
leave
ret

Function at 0x47b2d5
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x47b30d
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0047938c
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00479364
jmp 0x47b319
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x47c9ca
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x47ca0c
call fcn.0048247f
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x47ca0c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x47ca03
xor eax, eax
jmp 0x47ca14
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0047ca1a
pop edi
pop esi
pop ebx
ret 4

Function at 0x4829af
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4829dd
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4829fb
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.00482915
jmp 0x4829fb
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4829fb
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.00482915
test edi, edi
mov eax, edi
jne 0x4829e5
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4018d5
Capabilities:
Query environment variable

Disassembly:
push dword [esp + 8]
pop dword [0x410f54]
xor eax, eax
push eax
push eax
mov edx, dword [esp + 0xc]
lea ecx, [esp]
call fcn.00406008
push dword [0x410f54]
push 0x104
call fcn.00406330
sub esp, 4
lea ecx, [esp + 8]
pop edx
call fcn.00406000
push 0x104
mov eax, dword [esp + 8]
push eax
mov eax, dword [esp + 8]
push eax
call sub.KERNEL32.dll_ExpandEnvironmentStringsA
mov edx, dword [esp + 4]
push dword [0x410f54]
call fcn.0040d6a0
pop eax
add eax, dword [0x40f3c8]
jmp 0x401946
push dword [esp + 4]
call fcn.0040d700
push dword [esp]
call fcn.0040d700
add esp, 8
ret 4

Function at 0x40195d
Capabilities:
Get geographical location

Disassembly:
push dword [esp + 4]
pop dword [0x410f54]
xor eax, eax
push eax
push eax
push dword [0x410f54]
push 0x104
call fcn.00406330
sub esp, 4
lea ecx, [esp + 8]
pop edx
call fcn.00406000
push 0x104
push dword [esp + 8]
push 4
push 0x400
call sub.KERNEL32.dll_GetLocaleInfoA
mov dword [esp], eax
push dword [0x410f54]
push dword [esp + 4]
push dword [esp + 0xc]
call fcn.004062c0
sub esp, 4
pop eax
add eax, dword [0x40f3c8]
jmp 0x4019d0
push dword [esp + 4]
call fcn.0040d700
add esp, 8
ret
Function at 0x4070ce
Capabilities:
Enumerate gui resources

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
cmp dword [ebp + 8], 0
je 0x4070e8
push dword [ebp + 8]
push 0x407060
call sub.USER32.dll_EnumWindows
jmp 0x40711f
mov edi, dword [0x40f440]
jmp 0x40711b
mov esi, dword [edi]
call sub.KERNEL32.dll_GetCurrentThreadId
cmp dword [edi + 8], eax
jne 0x407119
push 1
push dword [edi + 0xc]
call sub.USER32.dll_EnableWindow
mov eax, edi
add eax, 8
push eax
push 0x40f440
call fcn.0040d5a0
add esp, 8
mov edi, esi
or edi, edi
jne 0x4070f0
pop edi
pop esi
pop ebp
ret 4

Function at 0x40823f
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push dword [0x410fa0]
call fcn.0040d320
mov dword [ebp - 4], eax
cmp dword [0x40f490], 0
jne 0x4082d2
push 0x90
push 0x410c50
call fcn.00406018
mov dword [0x410c50], 0xa
mov dword [0x410c54], 0x90
lea eax, [0x40821a]
mov dword [0x410c58], eax
lea eax, [0x40a330]
mov dword [0x410cc8], eax
lea eax, [0x40a388]
mov dword [0x410ccc], eax
lea eax, [0x4081f8]
mov dword [0x410c5c], eax
push 0x7f89
push 0
call sub.USER32.dll_LoadCursorA
mov dword [0x40f490], eax
or eax, eax
jne 0x4082d2
push 0x7f00
push 0
call sub.USER32.dll_LoadCursorA
mov dword [0x40f490], eax
push 0
push dword [0x410970]
push 0xffffffffffffffff
mov eax, dword [ebp - 4]
push dword [eax]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push 0x40000000
push dword [ebp + 0x1c]
push str.STATIC
push 0
call sub.USER32.dll_CreateWindowExA
mov esi, eax
or eax, eax
je 0x408372
push dword [ebp + 8]
push dword [0x410f9c]
call fcn.0040d350
mov edi, eax
or dword [edi + 0x10], 0xffffffff
and dword [edi + 0x14], 0
push 0x10
push 0
push dword [0x41096c]
call sub.KERNEL32.dll_HeapAlloc
mov ebx, eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 8]
mov dword [ebx], eax
mov eax, dword [ebp + 0x24]
mov dword [ebx + 4], eax
mov eax, dword [ebp + 0x20]
mov dword [ebx + 0xc], eax
mov dword [edi + 0x1c], ebx
push 0x410c50
push esi
push edi
push dword [ebp + 8]
call fcn.0040a219
mov esi, eax
push 0x407e50
push 0xfffffffffffffffc
push dword [edi]
call sub.USER32.dll_SetWindowLongA
mov dword [ebx + 8], eax
push 1
push dword [edi]
call sub.USER32.dll_ShowWindow
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x20

Function at 0x409fd0
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
push dword [ebp + 8]
push dword [0x410f9c]
call fcn.0040d3b2
mov edi, eax
or eax, eax
je 0x40a019
mov eax, dword [edi + 4]
cmp dword [eax + 0x5c], 0
je 0x409fff
push dword [ebp + 0xc]
push edi
mov ebx, dword [edi + 4]
call dword [ebx + 0x5c]
jmp 0x40a019
cmp dword [ebp + 0xc], 0
je 0x40a010
push 0
push dword [edi]
call sub.USER32.dll_ShowWindow
jmp 0x40a019
push 5
push dword [edi]
call sub.USER32.dll_ShowWindow
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x40b850
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push ecx
push eax
push ebx
push esi
push edi
push dword [ebp + 8]
push dword [0x410fa4]
call fcn.0040d3b2
mov edi, eax
or eax, eax
je 0x40b8b7
cmp dword [ebp + 0xc], 0
je 0x40b899
push 4
push dword [edi]
call sub.USER32.dll_GetWindow
mov dword [ebp - 8], eax
or eax, eax
je 0x40b88e
cmp dword [edi + 0x1c], 0
jne 0x40b88e
push eax
call sub.USER32.dll_SetActiveWindow
push 0
push dword [edi]
call sub.USER32.dll_ShowWindow
jmp 0x40b8b7
push dword [edi]
call sub.USER32.dll_IsZoomed
xor ebx, ebx
cmp eax, ebx
sete bl
dec ebx
and ebx, 2
inc ebx
mov dword [ebp - 4], ebx
push ebx
push dword [edi]
call sub.USER32.dll_ShowWindow
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40c7da
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push edi
push 9
call sub.USER32.dll_GetKeyState
mov edi, eax
movsx edi, di
test di, 0x80
je 0x40c873
push 0x11
call sub.USER32.dll_GetKeyState
mov edi, eax
movsx edi, di
test di, 0x80
jne 0x40c873
push 0x10
call sub.USER32.dll_GetKeyState
mov edi, eax
movsx edi, di
test di, 0x80
jne 0x40c873
push 0x12
call sub.USER32.dll_GetKeyState
mov edi, eax
movsx edi, di
test di, 0x80
jne 0x40c873
call sub.USER32.dll_GetFocus
push 5
lea edi, [ebp - 0xd]
push edi
push eax
call sub.USER32.dll_GetClassNameA
push 4
push str.Rich
lea eax, [ebp - 0xd]
push eax
call sub.CRTDLL.dll_strncmp
add esp, 0xc
or eax, eax
jne 0x40c873
call sub.USER32.dll_GetFocus
push 0
push 0
push 0x44e
push eax
call sub.USER32.dll_SendMessageA
test ax, 0x800
jne 0x40c873
xor eax, eax
jmp 0x40c89e
push str.PB_WindowID
push dword [ebp + 8]
call sub.USER32.dll_GetPropA
mov dword [ebp - 4], eax
or eax, eax
je 0x40c89c
dec eax
push eax
push dword [0x410fa4]
call fcn.0040d3b2
mov dword [ebp - 8], eax
mov eax, dword [eax + 0xc]
jmp 0x40c89e
xor eax, eax
pop edi
leave
ret 4

Function at 0x40cad0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
mov eax, dword [0x40f6bc]
mov edx, dword [0x40f6c0]
mov dword [ebp - 0x10c], edx
mov dword [ebp - 0x110], eax
mov eax, dword [ebp + 8]
or eax, eax
je 0x40cc26
cmp byte [eax], 0
je 0x40cc26
push 0x104
push eax
lea eax, [ebp - 0x105]
push eax
call sub.CRTDLL.dll_strncpy
mov byte [ebp - 1], 0
lea eax, [ebp - 0x105]
push eax
call sub.CRTDLL.dll_strlen
add esp, 0x10
mov dword [ebp - 0x114], eax
lea eax, [ebp + eax - 0x106]
mov dword [ebp - 0x118], eax
mov eax, dword [ebp - 0x114]
cmp eax, 2
je 0x40cb4c
cmp eax, 3
jne 0x40cba3
cmp byte [ebp - 0x104], 0x3a
jne 0x40cba3
cmp dword [ebp - 0x114], 2
jne 0x40cb72
push 0x40f6b8
lea eax, [ebp - 0x105]
push eax
call sub.CRTDLL.dll_strcat
add esp, 8
lea eax, [ebp - 0x105]
push eax
call sub.KERNEL32.dll_GetDriveTypeA
cmp eax, 1
jbe 0x40cc26
mov eax, dword [0x40f6b0]
mov edx, dword [0x40f6b4]
mov dword [ebp - 0x10c], edx
mov dword [ebp - 0x110], eax
jmp 0x40cc26
mov eax, dword [ebp - 0x118]
cmp byte [eax], 0x5c
jne 0x40cbb1
mov byte [eax], 0
lea eax, [ebp - 0x25c]
push eax
lea eax, [ebp - 0x105]
push eax
call sub.KERNEL32.dll_FindFirstFileA
mov dword [ebp - 0x11c], eax
cmp eax, 0xffffffff
je 0x40cc26
test byte [ebp - 0x25c], 0x10
je 0x40cbf1
mov eax, dword [0x40f6b0]
mov edx, dword [0x40f6b4]
mov dword [ebp - 0x10c], edx
mov dword [ebp - 0x110], eax
jmp 0x40cc1b
push 0
push dword [ebp - 0x23c]
mov eax, dword [ebp - 0x240]
xor edx, edx
mov edx, eax
xor eax, eax
push edx
push eax
pop eax
pop edx
pop ecx
or eax, ecx
pop ecx
or edx, ecx
mov dword [ebp - 0x10c], edx
mov dword [ebp - 0x110], eax
push dword [ebp - 0x11c]
call sub.KERNEL32.dll_FindClose
mov edx, dword [ebp - 0x10c]
mov eax, dword [ebp - 0x110]
leave
ret 4
Function at 0x40cc90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push edi
mov edi, dword [ebp + 8]
and dword [ebp - 4], 0
cmp dword [edi + 0x14], 0
jne 0x40ccbf
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [edi + 8]
sub eax, dword [edi + 0xc]
push eax
push dword [edi + 4]
push dword [edi]
call sub.KERNEL32.dll_WriteFile
mov eax, dword [edi + 8]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 4]
pop edi
leave
ret 4

Function at 0x40ced0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push edi
and dword [ebp - 4], 0
push dword [ebp + 8]
push dword [0x410fb8]
call fcn.0040d3b2
mov edi, eax
or eax, eax
je 0x40cf48
cmp dword [edi + 4], 0
je 0x40cf18
push 1
lea eax, [ebp - 4]
push eax
push edi
call fcn.0040d140
or eax, eax
je 0x40cf0f
inc dword [edi + 0xc]
and dword [ebp - 4], 0
jmp 0x40cf48
mov dword [ebp - 4], 1
jmp 0x40cf48
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 9]
push eax
push dword [edi]
call sub.KERNEL32.dll_ReadFile
or eax, eax
je 0x40cf35
cmp dword [ebp - 8], 0
jne 0x40cf3b
or dword [ebp - 4], 0xffffffff
jmp 0x40cf48
push 1
push 0
push 0xffffffffffffffff
push dword [edi]
call sub.KERNEL32.dll_SetFilePointer
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 4

Function at 0x40cf60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov ebx, 0x1000
push dword [ebp + 0xc]
push 0x1000
call fcn.0040d8c0
mov esi, eax
mov edi, esi
push dword [ebp + 8]
push dword [0x410fb8]
call fcn.0040d3b2
mov dword [ebp - 8], eax
or eax, eax
je 0x40d07f
mov byte [ebp - 1], 0
mov eax, dword [ebp - 8]
cmp dword [eax + 4], 0
je 0x40cfb8
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 8]
call fcn.0040d140
mov dword [ebp - 0xc], eax
jmp 0x40cfce
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [ebp - 8]
push dword [eax]
call sub.KERNEL32.dll_ReadFile
cmp byte [ebp - 1], 0
je 0x40cfda
mov al, byte [ebp - 1]
mov byte [edi], al
inc edi
mov eax, edi
sub eax, esi
cmp eax, ebx
jl 0x40d001
add ebx, 0x1000
mov eax, edi
sub eax, esi
mov dword [ebp - 0x10], eax
push dword [ebp + 0xc]
push ebx
call fcn.0040d8c0
mov esi, eax
mov eax, dword [ebp - 0x10]
mov edi, eax
add edi, esi
movsx eax, byte [ebp - 1]
or eax, eax
je 0x40d01d
cmp dword [ebp - 0xc], 0
je 0x40d01d
cmp eax, 0xd
je 0x40d01d
cmp eax, 0xa
jne 0x40cf98
cmp byte [ebp - 1], 0
je 0x40d07f
dec edi
cmp byte [ebp - 1], 0xd
jne 0x40d07f
mov eax, dword [ebp - 8]
cmp dword [eax + 4], 0
je 0x40d043
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 8]
call fcn.0040d140
jmp 0x40d059
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [ebp - 8]
push dword [eax]
call sub.KERNEL32.dll_ReadFile
cmp byte [ebp - 1], 0xa
je 0x40d07f
mov eax, dword [ebp - 8]
cmp dword [eax + 4], 0
je 0x40d06f
add eax, 0xc
inc dword [eax]
jmp 0x40d07f
push 1
push 0
push 0xffffffffffffffff
mov eax, dword [ebp - 8]
push dword [eax]
call sub.KERNEL32.dll_SetFilePointer
mov byte [edi], 0
mov eax, edi
sub eax, esi
mov edx, ebx
sub edx, eax
push edx
call fcn.0040d9a0
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x40d0a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push eax
push esi
push edi
and dword [ebp - 4], 0
and dword [ebp - 8], 0
push dword [ebp + 8]
push dword [0x410fb8]
call fcn.0040d3b2
mov edi, eax
or eax, eax
je 0x40d137
mov eax, dword [ebp + 0xc]
or eax, eax
je 0x40d105
cmp byte [eax], 0
je 0x40d105
cmp dword [edi + 4], 0
je 0x40d0eb
push eax
call sub.CRTDLL.dll_strlen
pop ecx
push eax
push dword [ebp + 0xc]
push edi
call fcn.0040d250
mov dword [ebp - 4], eax
jmp 0x40d105
push dword [ebp + 0xc]
call sub.CRTDLL.dll_strlen
pop ecx
push 0
lea esi, [ebp - 4]
push esi
push eax
push dword [ebp + 0xc]
push dword [edi]
call sub.KERNEL32.dll_WriteFile
cmp dword [edi + 4], 0
je 0x40d11d
push 2
push 0x40f6d0
push edi
call fcn.0040d250
mov dword [ebp - 8], eax
jmp 0x40d131
push 0
lea eax, [ebp - 8]
push eax
push 2
push 0x40f6d0
push dword [edi]
call sub.KERNEL32.dll_WriteFile
mov eax, dword [ebp - 8]
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret 8

Function at 0x40d140
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
cmp dword [edi + 0x14], 0
jne 0x40d165
push edi
call fcn.0040cc90
mov dword [edi + 0x14], 1
and dword [edi + 0xc], 0
cmp dword [edi + 0xc], esi
jl 0x40d1bd
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
mov ebx, eax
add ebx, dword [edi + 4]
mov eax, esi
cmp eax, 1
je 0x40d188
cmp eax, 2
je 0x40d191
cmp eax, 4
je 0x40d19c
jmp 0x40d1a5
mov eax, dword [ebp + 0xc]
mov dl, byte [ebx]
mov byte [eax], dl
jmp 0x40d1b2
mov eax, dword [ebp + 0xc]
mov dx, word [ebx]
mov word [eax], dx
jmp 0x40d1b2
mov eax, dword [ebp + 0xc]
mov edx, dword [ebx]
mov dword [eax], edx
jmp 0x40d1b2
push esi
push ebx
push dword [ebp + 0xc]
call sub.CRTDLL.dll_memcpy
add esp, 0xc
sub dword [edi + 0xc], esi
mov dword [ebp - 4], esi
jmp 0x40d23f
mov ebx, dword [edi + 0xc]
push ebx
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
add eax, dword [edi + 4]
push eax
push dword [ebp + 0xc]
call sub.CRTDLL.dll_memcpy
add esp, 0xc
mov eax, ebx
add eax, dword [ebp + 0xc]
mov dword [ebp + 0xc], eax
sub esi, ebx
cmp esi, dword [edi + 8]
jl 0x40d1ff
push 0
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0xc]
push dword [edi]
call sub.KERNEL32.dll_ReadFile
and dword [edi + 0xc], 0
add dword [ebp - 4], ebx
jmp 0x40d23f
push 0
lea eax, [ebp - 4]
push eax
push dword [edi + 8]
push dword [edi + 4]
push dword [edi]
call sub.KERNEL32.dll_ReadFile
mov eax, dword [ebp - 4]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 4]
mov dword [edi + 0x10], eax
cmp esi, dword [edi + 0xc]
jle 0x40d226
mov esi, dword [edi + 0xc]
push esi
push dword [edi + 4]
push dword [ebp + 0xc]
call sub.CRTDLL.dll_memcpy
add esp, 0xc
sub dword [edi + 0xc], esi
mov eax, ebx
add eax, esi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x40d250
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
and dword [ebp - 4], 0
cmp dword [edi + 0x14], 1
jne 0x40d273
and dword [edi + 0x14], 0
mov eax, dword [edi + 8]
mov dword [edi + 0xc], eax
cmp dword [edi + 0xc], esi
jle 0x40d2d4
mov eax, dword [edi + 8]
sub eax, dword [edi + 0xc]
add eax, dword [edi + 4]
mov dword [ebp - 8], eax
mov eax, esi
cmp eax, 1
je 0x40d297
cmp eax, 2
je 0x40d2a3
cmp eax, 4
je 0x40d2b1
jmp 0x40d2bd
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dl, byte [edx]
mov byte [eax], dl
jmp 0x40d2cc
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dx, word [edx]
mov word [eax], dx
jmp 0x40d2cc
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov edx, dword [edx]
mov dword [eax], edx
jmp 0x40d2cc
push esi
push dword [ebp + 0xc]
push dword [ebp - 8]
call sub.CRTDLL.dll_memcpy
add esp, 0xc
sub dword [edi + 0xc], esi
mov dword [ebp - 4], esi
jmp 0x40d30e
push edi
call fcn.0040cc90
cmp esi, dword [edi + 8]
jl 0x40d2f2
push 0
lea eax, [ebp - 4]
push eax
push esi
push dword [ebp + 0xc]
push dword [edi]
call sub.KERNEL32.dll_WriteFile
jmp 0x40d30e
push esi
push dword [ebp + 0xc]
mov eax, dword [edi + 8]
sub eax, dword [edi + 0xc]
add eax, dword [edi + 4]
push eax
call sub.CRTDLL.dll_memcpy
add esp, 0xc
sub dword [edi + 0xc], esi
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0xc