joyce8/EMBER2024-capa huggingface dataset:
Function at 0x302d5b0
Capabilities:
Enumerate pe sections

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 8
cmp dword [ebp + 8], 0
jne 0x302d5c7
push 0x57
call fcn.0305c450
jmp 0x302d624
mov eax, dword [ebp + 8]
movzx ecx, word [eax + 0x14]
mov edx, dword [ebp + 8]
lea eax, [edx + ecx + 0x18]
mov dword [ebp - 4], eax
mov dword [ebp - 8], 0
jmp 0x302d5ea
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 8]
movzx eax, word [edx + 6]
cmp dword [ebp - 8], eax
jae 0x302d622
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 0x10]
cmp edx, dword [ecx + 0xc]
jb 0x302d617
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 0x10]
cmp dword [ebp + 0x10], ecx
jae 0x302d617
mov eax, dword [ebp - 4]
jmp 0x302d624
mov eax, dword [ebp - 4]
add eax, 0x28
mov dword [ebp - 4], eax
jmp 0x302d5e1
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc
Function at 0x3037260
Capabilities:
Get file size
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
cmp dword [ebp + 0x14], 0
jne 0x3037286
cmp dword [ebp + 0x18], 0
je 0x303727a
cmp dword [ebp + 0x1c], 0
jne 0x3037286
push 0x57
call fcn.0305c450
jmp 0x30373d5
mov eax, dword [ebp + 8]
push eax
call fcn.0305c450
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x30372a4
push 6
call fcn.0305c450
jmp 0x30373d5
push 0
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x14]
push eax
call fcn.0305c450
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x30372cc
push 0x7e
call fcn.0305c450
jmp 0x30373d5
mov dword [ebp - 4], 0
cmp dword [ebp + 0x18], 0
jne 0x303738b
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov ecx, dword [ebp + 0x14]
push ecx
call dword [0x31185fc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x303730e
push 0x57
call fcn.0305c450
jmp 0x30373d5
push 0
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.kernel32.dll_GetFileSize]
mov dword [ebp + 0x1c], eax
cmp dword [ebp + 0x1c], 0
jne 0x3037339
mov eax, dword [ebp - 8]
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
push 0x57
call fcn.0305c450
jmp 0x30373d5
mov ecx, dword [ebp + 0x1c]
push ecx
call fcn.0305c450
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x303737f
push 0
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp + 0x1c]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x303737f
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp + 0x1c]
je 0x303737f
mov ecx, dword [ebp - 4]
push ecx
call fcn.0305c450
mov dword [ebp - 4], 0
mov edx, dword [ebp - 8]
push edx
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x30373b1
mov eax, dword [ebp + 0x1c]
push eax
call fcn.0305c450
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x30373b1
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp - 4]
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
cmp dword [ebp - 4], 0
jne 0x30373c0
push 0x57
call fcn.0305c450
jmp 0x30373d5
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0305c450
mov esp, ebp
pop ebp
ret 0x18
Function at 0x403536
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
je 0x40358b
push dword [esp + 0x10]
push 0x4034b5
call dword [sym.imp.USER32.dll_EnumWindows]
mov esi, dword [0x4a6b04]
test esi, esi
je 0x4035e4
xor edi, edi
mov ebx, dword [esi]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x403583
cmp byte [esi + 0x10], 0
je 0x403583
push 3
push edi
push edi
push edi
push edi
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
mov esi, ebx
test ebx, ebx
jne 0x40355f
jmp 0x4035e4
mov esi, dword [0x4a6b04]
test esi, esi
je 0x4035e4
xor edi, edi
push ebp
mov ebx, dword [esi]
lea ebp, [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [ebp], eax
jne 0x4035dd
cmp byte [esi + 0x11], 0
je 0x4035b9
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_EnableWindow]
cmp byte [esi + 0x10], 0
je 0x4035d0
push 3
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.dll_SetWindowPos]
push ebp
push 0x4a6b04
call fcn.004110be
pop ecx
pop ecx
mov esi, ebx
test ebx, ebx
jne 0x403598
pop ebp
pop edi
pop esi
pop ebx
ret 4
Function at 0x404b72
Capabilities:
Delete file

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
xor edi, edi
test esi, esi
je 0x404bd4
cmp word [esi], di
je 0x404bd4
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
call fcn.00420210
push dword [esp + 0x1c]
mov ebx, eax
push ebx
call dword [esp + 0x20]
push esi
push ebx
call fcn.004204c0
add esp, 0x10
test eax, eax
jne 0x404bd3
push 0x24
push 8
push dword [0x4a6a68]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov eax, dword [esp + 0x10]
mov dword [ecx + 0x14], edi
mov edi, ecx
mov dword [ecx], ebx
mov dword [ecx + 8], 1
mov dword [ecx + 0x20], eax
mov dword [eax + 4], ecx
pop ebx
mov eax, edi
pop edi
pop esi
ret 0x10

Function at 0x405c34
Capabilities:
Get graphical window text

Disassembly:
push ebx
push dword [esp + 8]
push dword [0x4a7478]
call fcn.00410954
mov ebx, eax
test ebx, ebx
je 0x405c98
mov ecx, dword [ebx + 4]
mov eax, dword [ecx + 0x18]
test eax, eax
je 0x405c5d
push dword [esp + 0xc]
push ebx
call eax
jmp 0x405c98
push esi
push edi
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextLengthW]
push dword [esp + 0x14]
mov edi, eax
push edi
call fcn.00411510
mov esi, eax
lea ecx, [edi + 1]
push ecx
xor eax, eax
push esi
mov word [esi], ax
push dword [ebx]
call dword [sym.imp.USER32.dll_GetWindowTextW]
push esi
call sub.MSVCRT.dll_wcslen
pop ecx
sub edi, eax
push edi
call fcn.004115e0
pop edi
pop esi
pop ebx
ret 8

Function at 0x408572
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 8]
push dword [0x4a7484]
call fcn.00410954
mov esi, eax
test esi, esi
je 0x40864c
cmp dword [ebp + 0xc], 0
je 0x4085be
push 4
push dword [esi]
call dword [sym.imp.USER32.dll_GetWindow]
test eax, eax
je 0x4085af
cmp dword [esi + 0x1c], 0
jne 0x4085af
push eax
call dword [sym.imp.USER32.dll_SetActiveWindow]
push 0
push dword [esi]
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x40864c
test byte [ebp + 0x10], 3
je 0x4085d9
push 4
push dword [esi]
call dword [sym.imp.USER32.dll_GetWindow]
push eax
push dword [ebp + 0x10]
push dword [esi]
call fcn.00408d9e
cmp dword [esi + 0x3c], 0xffffffff
push ebx
je 0x4085fe
xor ebx, ebx
cmp dword [esi + 0x3c], 0x1000000
sete bl
xor ecx, ecx
cmp dword [esi + 0x3c], 0x20000000
sete cl
or dword [esi + 0x3c], 0xffffffff
jmp 0x408612
push dword [esi]
call dword [sym.imp.USER32.dll_IsZoomed]
push dword [esi]
mov ebx, eax
call dword [sym.imp.USER32.dll_IsIconic]
mov ecx, eax
test dword [ebp + 0x10], 0x2000000
je 0x40862f
test ebx, ebx
je 0x408623
push 8
jmp 0x408635
neg ecx
sbb ecx, ecx
and ecx, 3
add ecx, 4
jmp 0x408642
test ebx, ebx
je 0x408638
push 3
pop ecx
jmp 0x408642
xor eax, eax
test ecx, ecx
setne al
lea ecx, [eax + 1]
push ecx
push dword [esi]
call dword [sym.imp.USER32.dll_ShowWindow]
pop ebx
pop esi
pop ebp
ret 0xc
Function at 0x408b23
Capabilities:
Log keystrokes via polling

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
call dword [sym.imp.USER32.dll_GetFocus]
mov esi, dword [sym.imp.USER32.dll_GetKeyState]
mov ebx, eax
test ebx, ebx
je 0x408bb6
push 9
call esi
test al, al
jns 0x408bb6
push 0x11
call esi
test al, al
js 0x408bb6
push 0x10
call esi
test al, al
js 0x408bb6
push 0x12
call esi
test al, al
js 0x408bb6
push 0x10
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.USER32.dll_GetClassNameW]
push 5
lea eax, [ebp - 0x24]
push str.RichE
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
je 0x408b98
push 4
lea eax, [ebp - 0x24]
push str.RICHE
push eax
call sub.MSVCRT.dll_wcsncmp
add esp, 0xc
test eax, eax
jne 0x408bb6
push 0
push 0
push 0x44e
push ebx
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, 0x800
jne 0x408bb6
xor eax, eax
jmp 0x408c37
push edi
mov edi, dword [ebp + 8]
test edi, edi
je 0x408bde
push 0x11
call esi
test al, al
js 0x408bd6
push 0x10
call esi
test al, al
js 0x408bd6
push 0x12
call esi
test al, al
jns 0x408bde
push 1
push edi
call fcn.00408c3f
mov esi, dword [sym.imp.USER32.dll_GetPropW]
test ebx, ebx
je 0x408bf4
push str.PB_Hotkey
push ebx
call esi
test eax, eax
jne 0x408c34
push str.PB_WindowID
push edi
call esi
mov esi, eax
test esi, esi
je 0x408c34
lea eax, [ebp - 4]
push eax
push edi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
test eax, eax
je 0x408c34
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp - 4], eax
jne 0x408c34
lea eax, [esi - 1]
push eax
push dword [0x4a7484]
call fcn.00410954
test eax, eax
je 0x408c34
mov eax, dword [eax + 8]
jmp 0x408c36
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x40996c
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 0x409ab4
xor ecx, ecx
cmp word [eax], cx
je 0x409ab4
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x4099c5
cmp eax, 3
jne 0x4099ff
cmp word [esp + 0xa], 0x3a
jne 0x4099ff
cmp eax, 2
jne 0x4099e3
lea eax, [esp + 8]
push 0x44f2a8
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x409ab4
push 0xfffffffffffffffe
pop edi
jmp 0x409ab4
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x409a14
cmp ax, bx
jne 0x409a1e
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x409a07
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x409a5d
test byte [esp + 0x21c], 0x10
je 0x409a44
push 0xfffffffffffffffe
pop edi
jmp 0x409a54
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x409ab2
cmp word [esp + 0x10], bp
jne 0x409a6b
cmp word [esp + 0x12], bp
je 0x409a8a
cmp word [esp + 0x10], bx
jne 0x409a79
cmp word [esp + 0x12], bx
je 0x409a8a
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x409ab2
cmp word [esp + 0x12], ax
jne 0x409ab2
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x409a9f
test al, 0x10
je 0x409ab2
jmp 0x409aaf
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x409ab2
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 0x409b11
Capabilities:
Check if file exists

Disassembly:
xor eax, eax
push ebp
mov ebp, eax
mov eax, dword [0x4a7240]
push esi
test eax, eax
jne 0x409b36
push 0x409c3e
push 0x10
push 0x258
call fcn.004109fd
mov dword [0x4a7240], eax
push dword [esp + 0xc]
push eax
call fcn.0041097c
mov esi, eax
test esi, esi
je 0x409c37
push edi
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x409b58
mov edi, section..rdata
push ebx
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x409b68
xor eax, eax
cmp word [ebx], ax
jne 0x409b6d
mov ebx, 0x44f2ac
push edi
call sub.MSVCRT.dll_wcslen
push ebx
mov dword [esp + 0x24], eax
call sub.MSVCRT.dll_wcslen
add eax, dword [esp + 0x24]
pop ecx
pop ecx
lea eax, [eax*2 + 4]
push eax
xor eax, eax
push eax
push dword [0x4a6a68]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x409c1e
push edi
push eax
call sub.MSVCRT.dll_wcscpy
mov eax, dword [esp + 0x24]
pop ecx
pop ecx
test eax, eax
je 0x409bce
cmp word [edi + eax*2 - 2], 0x5c
mov edi, dword [esp + 0x18]
je 0x409bd2
push 0x44f2a8
push edi
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
jmp 0x409bd2
mov edi, dword [esp + 0x18]
push ebx
push edi
call sub.MSVCRT.dll_wcscat
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 0x409bf6
xor eax, eax
mov ebp, esi
mov dword [esi + 4], eax
jmp 0x409c0c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x409c0a
mov dword [esi + 4], 1
mov ebp, esi
xor eax, eax
push edi
push eax
push dword [0x4a6a68]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebp, ebp
jne 0x409c35
cmp dword [esp + 0x14], 0xffffffff
je 0x409c29
mov esi, dword [esp + 0x14]
push esi
push dword [0x4a7240]
call fcn.0041091a
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
ret 0xc

Function at 0x409cb4
Capabilities:
Copy file

Disassembly:
cmp dword [esp + 4], 0
je 0x409cd4
cmp dword [esp + 8], 0
je 0x409cd4
push 0
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x409cd6
xor eax, eax
ret 8

Function at 0x409cd9
Capabilities:
Delete file
Set file attributes

Disassembly:
cmp dword [esp + 4], 0
je 0x409d02
test byte [esp + 8], 2
je 0x409cf6
push pe_nt_image_headers32
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x409d04
xor eax, eax
ret 8

Function at 0x409db0
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 0x409dec
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 0x40a1b0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x4a749c]
call fcn.00410954
mov esi, eax
test esi, esi
je 0x40a22f
cmp dword [esi + 4], 0
je 0x40a200
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.0040a3a0
test eax, eax
je 0x40a1f4
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 0x40a23a
cmp dword [esp + 8], 0
je 0x40a23a
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 0x40a3a0
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0
jne 0x40a3c1
push esi
call fcn.00409db0
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
cmp ebx, edi
jl 0x40a435
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x40a422
dec ecx
je 0x40a40d
sub ecx, 2
je 0x40a3fa
push edi
push eax
push dword [esp + 0x1c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x14]
mov word [eax], cx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
mov eax, edi
mov byte [ecx], dl
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebx
add eax, dword [esi + 4]
push ebx
push eax
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x40a47a
lea eax, [esp + 0x18]
push eax
push edi
push ebp
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
add eax, ebx
pop esi
pop ebx
ret 0xc
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x40a49b
mov edi, eax
push edi
push dword [esi + 4]
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
lea eax, [ebx + edi]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x40a4c0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x4a6a68]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x40a644
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x40a50e
test ebp, ebp
je 0x40a5b0
dec ebp
cmp dword [ebx + 4], 0
je 0x40a527
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.0040a3a0
mov dword [esp + 0x14], eax
jmp 0x40a541
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x40a5b0
test cl, cl
je 0x40a555
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x40a590
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x4a6a68]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x40a5b0
cmp dword [esp + 0x2c], 0
jne 0x40a500
cmp cl, 0xd
je 0x40a5b7
cmp cl, 0xa
jne 0x40a500
dec esi
jmp 0x40a627
cmp dword [esp + 0x2c], 0
jne 0x40a627
cmp cl, 0xa
jne 0x40a5bf
dec esi
jmp 0x40a627
cmp cl, 0xd
jne 0x40a627
dec esi
cmp dword [ebx + 4], 0
je 0x40a5de
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.0040a3a0
mov dword [esp + 0x14], eax
jmp 0x40a5f4
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x40a627
cmp dword [ebx + 4], 0
je 0x40a606
inc dword [ebx + 0xc]
jmp 0x40a627
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x40a650
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push 0x1000
push 0
push dword [0x4a6a68]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [esp + 8], ecx
test ecx, ecx
je 0x40a7fd
mov ax, word [esp]
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x2c]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], 0x1000
mov dword [esp + 0x1c], 0x7ff
cmp ebp, 0xffffffff
je 0x40a6a4
test ebp, ebp
je 0x40a75d
dec ebp
cmp dword [ebx + 4], 0
je 0x40a6bd
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.0040a3a0
mov dword [esp + 0x14], eax
jmp 0x40a6d7
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
cmp eax, 2
mov ax, word [esp + 0x10]
jne 0x40a75d
test ax, ax
je 0x40a6f1
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov esi, edi
mov edx, dword [esp + 0x1c]
sub esi, ecx
sar esi, 1
cmp esi, edx
jle 0x40a738
mov eax, dword [esp + 0x20]
add edx, 0x800
add eax, 0x1000
mov dword [esp + 0x1c], edx
push eax
push ecx
push 8
push dword [0x4a6a68]
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
mov ax, word [esp + 0x10]
mov dword [esp + 0x18], ecx
lea edi, [ecx + esi*2]
test ax, ax
je 0x40a75d
cmp dword [esp + 0x30], 0
jne 0x40a696
cmp ax, 0xd
je 0x40a764
cmp ax, 0xa
jne 0x40a696
sub edi, 2
jmp 0x40a7dc
cmp dword [esp + 0x30], 0
jne 0x40a7dc
cmp ax, 0xa
jne 0x40a76f
sub edi, 2
jmp 0x40a7dc
cmp ax, 0xd
jne 0x40a7dc
sub edi, 2
cmp dword [ebx + 4], 0
je 0x40a791
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.0040a3a0
mov dword [esp + 0x14], eax
jmp 0x40a7a7
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x10], 0xa
je 0x40a7dc
cmp dword [ebx + 4], 0
je 0x40a7bb
add dword [ebx + 0xc], 2
jmp 0x40a7dc
push 1
lea eax, [esp + 0x28]
mov dword [esp + 0x24], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x38]
mov ecx, edi
sub ecx, dword [esp + 0x18]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
xor eax, eax
add esp, 0x18
ret 0x10
Function at 0x40a810
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x4a6a68]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x40a960
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 0x40a85c
test edi, edi
je 0x40a8cd
dec edi
push esi
push ebp
call fcn.0040aa80
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40a86f
xor cl, cl
jmp 0x40a871
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 0x40a8b4
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x4a6a68]
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 0x40a8cd
test eax, eax
jne 0x40a852
cmp cl, 0xd
je 0x40a8d1
cmp cl, 0xa
jne 0x40a852
dec esi
jmp 0x40a943
test eax, eax
jne 0x40a943
cmp cl, 0xa
jne 0x40a8d9
dec esi
jmp 0x40a943
cmp cl, 0xd
jne 0x40a943
dec esi
cmp dword [ebp + 4], 0
je 0x40a8f8
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.0040a3a0
mov dword [esp + 0x20], eax
jmp 0x40a90f
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 0x40a943
cmp dword [ebp + 4], 0
je 0x40a921
inc dword [ebp + 0xc]
jmp 0x40a943
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