joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4080ed
Capabilities:
Check if file exists

Disassembly:
xor eax, eax
push ebp
mov ebp, eax
mov eax, dword [0x465da8]
push esi
test eax, eax
jne 0x408112
push fcn.004080bb
push 0x10
push 0x258
call fcn.0040d906
mov dword [0x465da8], eax
push dword [esp + 0xc]
push eax
call fcn.0040d7e6
mov esi, eax
test esi, esi
je 0x408213
push edi
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x408134
mov edi, 0x45b954
push ebx
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x408144
xor eax, eax
cmp word [ebx], ax
jne 0x408149
mov ebx, 0x45b918
push edi
call fcn.0040d9e3
push ebx
mov dword [esp + 0x24], eax
call fcn.0040d9e3
add eax, dword [esp + 0x24]
pop ecx
pop ecx
lea eax, [eax*2 + 4]
push eax
xor eax, eax
push eax
push dword [0x4654c4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x4081fa
push edi
push eax
call fcn.0040d9c1
mov eax, dword [esp + 0x24]
pop ecx
pop ecx
test eax, eax
je 0x4081aa
cmp word [edi + eax*2 - 2], 0x5c
mov edi, dword [esp + 0x18]
je 0x4081ae
push 0x45ac84
push edi
call fcn.0040d990
pop ecx
pop ecx
jmp 0x4081ae
mov edi, dword [esp + 0x18]
push ebx
push edi
call fcn.0040d990
pop ecx
pop ecx
lea eax, [esi + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x4081d2
xor eax, eax
mov ebp, esi
mov dword [esi + 4], eax
jmp 0x4081e8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x4081e6
mov dword [esi + 4], 1
mov ebp, esi
xor eax, eax
push edi
push eax
push dword [0x4654c4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebp, ebp
jne 0x408211
cmp dword [esp + 0x14], 0xffffffff
je 0x408205
mov esi, dword [esp + 0x14]
push esi
push dword [0x465da8]
call fcn.0040d8cc
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
ret 0xc
Function at 0x40825e
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 0x4083a6
xor ecx, ecx
cmp word [eax], cx
je 0x4083a6
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call fcn.00421bd8
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call fcn.0040d9e3
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x4082b7
cmp eax, 3
jne 0x4082f1
cmp word [esp + 0xa], 0x3a
jne 0x4082f1
cmp eax, 2
jne 0x4082d5
lea eax, [esp + 8]
push 0x45ac84
push eax
call fcn.0040d990
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x4083a6
push 0xfffffffffffffffe
pop edi
jmp 0x4083a6
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x408306
cmp ax, bx
jne 0x408310
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x4082f9
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x40834f
test byte [esp + 0x21c], 0x10
je 0x408336
push 0xfffffffffffffffe
pop edi
jmp 0x408346
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x4083a4
cmp word [esp + 0x10], bp
jne 0x40835d
cmp word [esp + 0x12], bp
je 0x40837c
cmp word [esp + 0x10], bx
jne 0x40836b
cmp word [esp + 0x12], bx
je 0x40837c
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x4083a4
cmp word [esp + 0x12], ax
jne 0x4083a4
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x408391
test al, 0x10
je 0x4083a4
jmp 0x4083a1
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x4083a4
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 0x408690
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 0x4086cc
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 0x4086e0
Capabilities:
Write file on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
cmp edi, 0xffffffff
jne 0x4086f9
push dword [0x465dac]
call fcn.00414e1d
pop edi
ret 4
push esi
push edi
push dword [0x465dac]
call fcn.0040d863
mov esi, eax
test esi, esi
je 0x408763
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x40874f
cmp dword [esi + 0x14], 0
mov dword [esp + 0xc], 0
jne 0x40873e
push 0
lea eax, [esp + 0x10]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push ecx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
push dword [esi + 4]
push 0
push dword [0x4654c4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push dword [0x465dac]
call fcn.0040d8cc
pop esi
pop edi
ret 4

Function at 0x408bd0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x465dac]
call fcn.0040d863
mov esi, eax
test esi, esi
je 0x408c4f
cmp dword [esi + 4], 0
je 0x408c20
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.00421cd0
test eax, eax
je 0x408c14
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 0x408c5a
cmp dword [esp + 8], 0
je 0x408c5a
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 0x408df0
Capabilities:
Write file on windows

Disassembly:
push ecx
mov edx, dword [esp + 0xc]
mov dword [esp], 0
test edx, edx
je 0x408eef
cmp word [edx], 0
je 0x408eef
mov ecx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0xc]
test ecx, ecx
jne 0x408e1e
mov ecx, dword [esi + 0x18]
push edi
cmp ecx, 0x19
jne 0x408e74
mov ecx, edx
lea edi, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x408e30
sub ecx, edi
sar ecx, 1
cmp dword [esi + 4], 0
je 0x408e56
lea eax, [ecx + ecx]
push eax
push edx
push esi
call fcn.004222d0
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea eax, [esp + 0xc]
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
lea eax, [esp + 0x14]
push eax
xor eax, eax
cmp ecx, 2
push edx
setne al
dec eax
and eax, 0xfde9
push eax
call fcn.004223f0
mov edi, eax
test edi, edi
je 0x408e6a
cmp dword [esi + 4], 0
je 0x408ec2
push dword [esp + 0x14]
push edi
push esi
call fcn.004222d0
push edi
push 0
push dword [0x4654c4]
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 [0x4654c4]
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 0x40a320
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x50
push ebp
xor ebp, ebp
cmp dword [0x465dc8], ebp
je 0x40a506
push ebx
mov ebx, dword [esp + 0x60]
push edi
test ebx, ebx
je 0x40a340
mov edi, ebx
jmp 0x40a352
push 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov edi, eax
test edi, edi
je 0x40a504
lea eax, [esp + 0x18]
push eax
push 0x18
push dword [esp + 0x68]
call dword [sym.imp.GDI32.dll_GetObjectW]
test eax, eax
je 0x40a4f9
mov ebp, dword [esp + 0x1c]
lea eax, [esp + 0x30]
push esi
mov esi, dword [esp + 0x24]
push 0x2c
push 0
push eax
mov dword [esp + 0x20], ebp
call fcn.00401160
add esp, 0xc
mov dword [esp + 0x34], 0x28
xor eax, eax
mov dword [esp + 0x38], ebp
inc eax
mov dword [esp + 0x3c], esi
mov word [esp + 0x40], ax
xor ecx, ecx
push 0x20
pop eax
push ecx
push ecx
mov word [esp + 0x4a], ax
lea eax, [esp + 0x18]
push eax
push ecx
lea eax, [esp + 0x44]
mov dword [esp + 0x54], ecx
push eax
push edi
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov ebp, eax
mov dword [esp + 0x18], ebp
test ebp, ebp
je 0x40a4f8
push 0
lea eax, [esp + 0x38]
push eax
push dword [esp + 0x18]
push esi
push 0
push dword [esp + 0x78]
push edi
call dword [sym.imp.GDI32.dll_GetDIBits]
imul esi, dword [esp + 0x14]
test esi, esi
jle 0x40a4f8
cmp dword [esp + 0x6c], 0
je 0x40a4a5
mov ebp, dword [esp + 0x10]
push 0xa
pop ebx
movzx ecx, byte [ebp + 1]
xor edx, edx
movzx eax, byte [ebp + 2]
lea eax, [eax + ecx*2]
movzx ecx, byte [ebp]
imul eax, eax, 3
add eax, ecx
div ebx
mov cl, al
cmp cl, 0x40
jae 0x40a439
movzx eax, cl
sub eax, 0x40
imul eax, eax, 7
cdq
idiv ebx
lea ecx, [eax + 0x40]
jmp 0x40a44f
cmp cl, 0xc0
jbe 0x40a44f
movzx eax, cl
sub eax, 0xc0
imul eax, eax, 7
cdq
idiv ebx
lea ecx, [eax - 0x40]
movzx eax, byte [ebp + 3]
movd xmm1, eax
cvtdq2ps xmm1, xmm1
movzx eax, cl
movd xmm0, eax
divss xmm1, dword [0x44b020]
cvtdq2ps xmm0, xmm0
mulss xmm1, xmm0
cvttss2si ecx, xmm1
mov byte [ebp], cl
mov eax, dword [esp + 0x10]
mov byte [eax + 1], cl
mov ecx, dword [esp + 0x10]
mov al, byte [ecx]
mov byte [ecx + 2], al
mov ebp, dword [esp + 0x10]
add ebp, 4
mov dword [esp + 0x10], ebp
sub esi, 1
jne 0x40a409
mov ebx, dword [esp + 0x68]
mov ebp, dword [esp + 0x18]
jmp 0x40a4f8
mov edx, dword [esp + 0x10]
mov al, byte [edx + 3]
cmp al, 0xff
jae 0x40a4ec
movzx ecx, al
movzx eax, byte [edx]
imul ecx, eax
shr ecx, 8
mov byte [edx], cl
mov edx, dword [esp + 0x10]
movzx eax, byte [edx + 1]
movzx ecx, byte [edx + 3]
imul ecx, eax
shr ecx, 8
mov byte [edx + 1], cl
mov edx, dword [esp + 0x10]
movzx ecx, byte [edx + 3]
movzx eax, byte [edx + 2]
imul ecx, eax
shr ecx, 8
mov byte [edx + 2], cl
mov edx, dword [esp + 0x10]
add edx, 4
mov dword [esp + 0x10], edx
sub esi, 1
jne 0x40a4a9
pop esi
test ebx, ebx
jne 0x40a504
push edi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop ebx
mov eax, ebp
pop ebp
add esp, 0x50
ret 0xc
Function at 0x40d5f8
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
je 0x40d64d
push dword [esp + 0x10]
push 0x40d6ac
call dword [sym.imp.USER32.dll_EnumWindows]
mov edi, dword [0x465eb4]
test edi, edi
je 0x40d6a6
xor esi, esi
mov ebx, dword [edi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi + 8], eax
jne 0x40d645
cmp byte [edi + 0x10], 0
je 0x40d645
push 3
push esi
push esi
push esi
push esi
push 0xfffffffffffffffe
push dword [edi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov edi, ebx
test ebx, ebx
jne 0x40d621
jmp 0x40d6a6
mov edi, dword [0x465eb4]
test edi, edi
je 0x40d6a6
xor esi, esi
push ebp
mov ebp, dword [edi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [edi + 8], eax
jne 0x40d69f
cmp byte [edi + 0x11], 0
je 0x40d678
push 1
push dword [edi + 0xc]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp byte [edi + 0x10], 0
je 0x40d68f
push 3
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push dword [edi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
lea eax, [edi + 8]
push eax
push 0x465eb4
call fcn.0040ce10
pop ecx
pop ecx
mov edi, ebp
test ebp, ebp
jne 0x40d65a
pop ebp
pop edi
pop esi
pop ebx
ret 4
Function at 0x418cf0
Capabilities:
Terminate process

Disassembly:
mov eax, dword [esp + 4]
test eax, eax
je 0x418d10
mov ecx, dword [eax + 0x40]
test ecx, ecx
je 0x418d10
mov eax, dword [eax + 0x44]
test eax, eax
je 0x418d10
push dword [esp + 8]
push eax
call ecx
add esp, 8
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x42178d
Capabilities:
Log keystrokes via polling

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
xor edi, edi
call dword [sym.imp.USER32.dll_GetFocus]
mov ebp, dword [esp + 0x3c]
mov ebx, eax
and dword [esp + 0x10], edi
push str.PB_WindowID
push ebp
call dword [sym.imp.USER32.dll_GetPropW]
mov esi, eax
push 9
pop eax
test esi, esi
je 0x421823
lea eax, [esp + 0x14]
push eax
push ebp
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
je 0x421820
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [esp + 0x14], eax
jne 0x421820
lea eax, [esi - 1]
push eax
push dword [0x465ef8]
call fcn.0040d863
mov edi, eax
mov dword [esp + 0x10], 1
xor eax, eax
push 9
cmp dword [edi + 0x10], eax
jle 0x421822
mov ecx, dword [edi + 4]
add ecx, 4
pop esi
cmp word [ecx - 2], si
jne 0x421810
mov edx, 0xfa01
cmp word [ecx], dx
je 0x42181b
inc eax
add ecx, 6
cmp eax, dword [edi + 0x10]
jl 0x421800
jmp 0x421820
and dword [esp + 0x10], 0
push 9
pop eax
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
test ebx, ebx
je 0x4218c9
push eax
call esi
test al, al
jns 0x4218c9
push 0x11
call esi
test al, al
js 0x4218c9
push 0x10
call esi
test al, al
js 0x4218c9
push 0x12
call esi
test al, al
js 0x4218c9
push 0x10
lea eax, [esp + 0x1c]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClassNameW]
cmp dword [esp + 0x10], 0
jne 0x4218c9
push 5
lea eax, [esp + 0x1c]
push str.RichE
push eax
call fcn.00426f07
add esp, 0xc
test eax, eax
je 0x42189d
push 4
lea eax, [esp + 0x1c]
push str.RICHE
push eax
call fcn.00426f07
add esp, 0xc
test eax, eax
jne 0x4218b4
push 0
push 0
push 0x44e
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, 0x800
je 0x42190a
lea eax, [esp + 0x18]
push str.Scintilla
push eax
call fcn.0040d950
pop ecx
pop ecx
test eax, eax
je 0x42190a
test ebp, ebp
je 0x4218ed
push 0x11
call esi
test al, al
js 0x4218e5
push 0x10
call esi
test al, al
js 0x4218e5
push 0x12
call esi
test al, al
jns 0x4218ed
push 1
push ebp
call fcn.00421a2e
test ebx, ebx
je 0x421901
push str.PB_Hotkey
push ebx
call dword [sym.imp.USER32.dll_GetPropW]
test eax, eax
jne 0x42190a
test edi, edi
je 0x42190a
mov eax, dword [edi + 8]
jmp 0x42190c
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 4
Function at 0x421cd0
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
cmp dword [ebx + 0x14], 0
jne 0x421cf2
push ebx
call fcn.00408690
mov dword [ebx + 0x14], 1
mov dword [ebx + 0xc], 0
mov ebp, dword [ebx + 0xc]
mov ecx, dword [ebx + 4]
mov esi, dword [esp + 0x1c]
sub ecx, ebp
add ecx, dword [ebx + 0x10]
cmp ebp, esi
jl 0x421d6e
mov eax, esi
sub eax, 1
je 0x421d5a
sub eax, 1
je 0x421d44
sub eax, 2
je 0x421d30
push esi
push ecx
push dword [esp + 0x20]
call fcn.0040d050
add esp, 0xc
mov eax, esi
sub dword [ebx + 0xc], esi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [ecx]
pop edi
mov dword [eax], ecx
mov eax, esi
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
mov cx, word [ecx]
pop edi
mov word [eax], cx
mov eax, esi
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov dl, byte [ecx]
mov eax, esi
mov ecx, dword [esp + 0x18]
pop edi
mov byte [ecx], dl
sub dword [ebx + 0xc], esi
pop esi
pop ebp
pop ebx
ret 0xc
mov eax, dword [esp + 0x18]
push ebp
push ecx
push eax
call fcn.0040d050
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [ebx + 8]
add eax, ebp
mov ecx, dword [ebx]
sub esi, ebp
mov dword [esp + 0x18], eax
push 0
cmp esi, edx
jl 0x421db6
lea edx, [esp + 0x18]
push edx
push esi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop edi
pop esi
add eax, ebp
mov dword [ebx + 0xc], 0
pop ebp
pop ebx
ret 0xc
lea eax, [esp + 0x18]
push eax
push edx
push dword [ebx + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [ebx + 0xc], eax
mov dword [ebx + 0x10], eax
cmp esi, eax
jle 0x421dd6
mov esi, eax
mov eax, dword [esp + 0x18]
push esi
push dword [ebx + 4]
push eax
call fcn.0040d050
sub dword [ebx + 0xc], esi
lea eax, [esi + ebp]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
Function at 0x421e00
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push 0x1000
push 0
push dword [0x4654c4]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x421f90
mov cl, byte [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x24]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x421e4e
test ebp, ebp
je 0x421ef6
dec ebp
cmp dword [ebx + 4], 0
lea edi, [ebx + 4]
je 0x421e6a
push 1
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.00421cd0
mov dword [esp + 0x10], eax
jmp 0x421e84
push 0
lea eax, [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x30]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
mov cl, byte [esp + 0x24]
cmp eax, 1
jne 0x421ef9
test cl, cl
je 0x421e98
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x24]
mov eax, dword [esp + 0x14]
mov edi, esi
mov edx, dword [esp + 0x1c]
dec eax
sub edi, edx
cmp edi, eax
jle 0x421ed3
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x4654c4]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x24]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [edi + edx]
test cl, cl
je 0x421ef6
cmp dword [esp + 0x28], 0
jne 0x421e40
cmp cl, 0xd
je 0x421f02
cmp cl, 0xa
jne 0x421e40
dec esi
jmp 0x421f73
lea edi, [ebx + 4]
cmp dword [esp + 0x28], 0
jne 0x421f73
jmp 0x421f05
lea edi, [ebx + 4]
cmp cl, 0xa
jne 0x421f0d
dec esi
jmp 0x421f73
cmp cl, 0xd
jne 0x421f73
dec esi
cmp dword [edi], 0
je 0x421f2b
push 1
lea eax, [esp + 0x28]
push eax
push ebx
call fcn.00421cd0
mov dword [esp + 0x10], eax
jmp 0x421f41
push 0
lea eax, [esp + 0x14]
push eax
push 1
lea eax, [esp + 0x30]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x24], 0xa
je 0x421f73
cmp dword [edi], 0
je 0x421f52
inc dword [ebx + 0xc]
jmp 0x421f73
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x30]
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, 0x10
ret 0x10
xor eax, eax
pop ebx
add esp, 0x10
ret 0x10
Function at 0x421fa0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x1c]
push 0x1000
push 0
push dword [0x4654c4]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 8], edx
test edx, edx
je 0x42215f
mov ax, word [esp + 0x1c]
push ebp
push esi
push edi
mov edi, edx
mov dword [esp + 0x1c], 0x1000
mov dword [esp + 0x18], 0x7ff
mov ecx, dword [esp + 0x30]
cmp ecx, 0xffffffff
je 0x421ff9
test ecx, ecx
je 0x4220bc
dec ecx
mov dword [esp + 0x30], ecx
cmp dword [ebx + 4], 0
lea ebp, [ebx + 4]
je 0x422015
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.00421cd0
mov dword [esp + 0x10], eax
jmp 0x42202f
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x10]
cmp eax, 2
mov ax, word [esp + 0x28]
jne 0x4220bf
test ax, ax
je 0x42204d
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x28]
mov edx, dword [esp + 0x14]
mov esi, edi
mov ecx, dword [esp + 0x18]
sub esi, edx
sar esi, 1
cmp esi, ecx
jle 0x422094
mov eax, dword [esp + 0x1c]
add ecx, 0x800
add eax, 0x1000
mov dword [esp + 0x18], ecx
push eax
push edx
push 8
push dword [0x4654c4]
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, eax
mov ax, word [esp + 0x28]
mov dword [esp + 0x14], edx
lea edi, [edx + esi*2]
test ax, ax
je 0x4220bf
cmp dword [esp + 0x2c], 0
jne 0x421fe3
cmp ax, 0xd
je 0x4220c6
cmp ax, 0xa
jne 0x421fe3
sub edi, 2
jmp 0x42213e
lea ebp, [ebx + 4]
cmp dword [esp + 0x2c], 0
jne 0x42213e
cmp ax, 0xa
jne 0x4220d1
sub edi, 2
jmp 0x42213e
cmp ax, 0xd
jne 0x42213e
sub edi, 2
cmp dword [ebp], 0
je 0x4220f3
push 2
lea eax, [esp + 0x2c]
push eax
push ebx
call fcn.00421cd0
mov dword [esp + 0x10], eax
jmp 0x422109
push 0
lea eax, [esp + 0x14]
push eax
push 2
lea eax, [esp + 0x34]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x28], 0xa
je 0x42213e
cmp dword [ebp], 0
je 0x42211d
add dword [ebx + 0xc], 2
jmp 0x42213e
push 1
lea eax, [esp + 0x24]
mov dword [esp + 0x20], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, edi
sub ecx, dword [esp + 0x14]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
pop ebx
add esp, 0x14
ret 0x10
Function at 0x422170
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x4654c4]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x4222c0
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 0x4221bc
test edi, edi
je 0x42222d
dec edi
push esi
push ebp
call fcn.00435780
mov dword [esp + 0x20], eax
test eax, eax
jne 0x4221cf
xor cl, cl
jmp 0x4221d1
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 0x422214
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x4654c4]
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 0x42222d
test eax, eax
jne 0x4221b2
cmp cl, 0xd
je 0x422231
cmp cl, 0xa
jne 0x4221b2
dec esi
jmp 0x4222a3
test eax, eax
jne 0x4222a3
cmp cl, 0xa
jne 0x422239
dec esi
jmp 0x4222a3
cmp cl, 0xd
jne 0x4222a3
dec esi
cmp dword [ebp + 4], 0
je 0x422258
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.00421cd0
mov dword [esp + 0x20], eax
jmp 0x42226f
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 0x4222a3
cmp dword [ebp + 4], 0
je 0x422281
inc dword [ebp + 0xc]
jmp 0x4222a3
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