joyce8/EMBER2024-capa huggingface dataset:
Function at 0x454240
Capabilities:
Get file size
Read file via mapping

Disassembly:
push 0xffffffffffffffff
push 0x4758c8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
push ebp
or ebp, 0xffffffff
push esi
push edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], ebp
xor ebx, ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x30]
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push eax
mov byte [esp + 0x44], 2
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
mov eax, dword [esp + 0x14]
cmp eax, esi
je 0x4542ae
lea ecx, [esp + 0x14]
call fcn.00405c03
mov eax, esi
mov dword [esp + 0x14], eax
cmp eax, ebp
jne 0x4542e1
lea ecx, [esp + 0x18]
mov byte [esp + 0x28], 1
call fcn.00410f6f
lea ecx, [esp + 0x10]
mov byte [esp + 0x28], bl
call fcn.004109d5
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], ebp
call fcn.00405c03
xor al, al
jmp 0x4543f4
push ebx
push ebx
push ebx
push 2
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, eax
mov eax, dword [esp + 0x10]
cmp eax, esi
je 0x45430f
cmp eax, ebx
je 0x454309
cmp edi, ebx
je 0x454309
push eax
call edi
mov eax, esi
mov dword [esp + 0x10], eax
cmp eax, ebx
jne 0x454346
mov ecx, dword [esp + 0x18]
cmp ecx, ebx
je 0x45433e
mov eax, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
cmp eax, ebx
je 0x45433e
push ecx
call eax
mov eax, dword [esp + 0x10]
mov dword [esp + 0x18], ebx
cmp eax, ebx
je 0x45433e
cmp edi, ebx
je 0x45433e
push eax
call edi
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x14]
cmp eax, ebp
jmp 0x454391
push ebx
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, eax
mov eax, dword [esp + 0x18]
cmp eax, esi
je 0x454373
cmp eax, ebx
je 0x45436d
cmp ebp, ebx
je 0x45436d
push eax
call ebp
mov eax, esi
mov dword [esp + 0x18], eax
cmp eax, ebx
jne 0x45439e
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x45438a
cmp edi, ebx
je 0x45438a
push eax
call edi
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x45439a
cmp edi, ebx
je 0x45439a
push eax
call edi
xor al, al
jmp 0x4543f4
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
push ecx
push ebx
push edx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x20]
push eax
push esi
call fcn.00453fd0
mov eax, dword [esp + 0x18]
cmp eax, ebx
je 0x4543cf
cmp ebp, ebx
je 0x4543cf
push eax
call ebp
mov dword [esp + 0x18], ebx
mov eax, dword [esp + 0x10]
cmp eax, ebx
je 0x4543e2
cmp edi, ebx
je 0x4543e2
push eax
call edi
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x14]
cmp eax, 0xffffffff
je 0x4543f2
cmp edi, ebx
je 0x4543f2
push eax
call edi
mov al, 1
mov ecx, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1c
ret 8
Function at 0x464f10
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x10
lea eax, [esp]
push esi
push eax
push 0x20019
push 0
push 0x4946d0
push SysReAllocStringLen
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x464f9a
mov esi, dword [esp + 4]
lea ecx, [esp + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 0x10], eax
lea edx, [esp + 8]
push ecx
lea eax, [esp + 0x14]
push edx
push eax
push 0
push 0x4946bc
push esi
mov dword [esp + 0x24], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x464f8f
mov ecx, dword [esp + 8]
push ebx
cmp ecx, 1
sete bl
test esi, esi
je 0x464f87
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
pop ebx
pop esi
add esp, 0x10
ret
test esi, esi
je 0x464f9a
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
pop esi
add esp, 0x10
ret
Function at 0x465390
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4759a5
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x58
mov eax, dword [esp + 0x68]
mov dword [esp + 4], 0x4765e0
test eax, eax
mov dword [esp + 0x24], 0x4765d8
jne 0x4653c5
mov eax, 0x494ad8
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x78]
push 0
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.004011a9
lea edx, [esp + 0x3c]
mov dword [esp + 0x70], 0
push edx
call fcn.00464fe0
push 0
push 0x80
push 4
push 0
push 1
push 0xc0000000
mov ecx, eax
mov byte [esp + 0x88], 1
call fcn.00401a19
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
mov dword [esp + 0x78], edi
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x5c]
neg eax
sbb eax, eax
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
and eax, ecx
mov byte [esp + 0x70], 5
mov edx, dword [eax]
mov esi, dword [edx + 4]
add esi, eax
call ebx
lea ecx, [esp + 0x3c]
mov dword [esi], eax
neg ecx
sbb ecx, ecx
lea eax, [esp + 0x50]
and ecx, eax
call fcn.00415e7b
lea ecx, [esp + 0x3c]
lea edx, [esp + 0x40]
neg ecx
sbb ecx, ecx
push 1
and ecx, edx
mov byte [esp + 0x74], 4
call fcn.00401245
mov byte [esp + 0x70], 3
mov eax, dword [esp + 0x3c]
mov ecx, dword [eax + 4]
mov edx, dword [esp + ecx + 0x3c]
push edx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push 2
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x20]
mov ebp, eax
lea esi, [eax + eax + 2]
mov eax, dword [esp + 0x2c]
cmp esi, eax
mov eax, dword [esp + 0x28]
jae 0x4654a9
test eax, eax
jne 0x4654c7
push eax
call fcn.0043a0ac
shr esi, 6
inc esi
shl esi, 6
push esi
mov dword [esp + 0x34], esi
call fcn.00454b4e
add esp, 8
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x2c]
push 0
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00401b15
lea edx, [esp + 0x10]
push 0
mov eax, dword [esp + 0x2c]
push edx
push ebp
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test edi, edi
je 0x4654fc
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x4654fc
push edi
call eax
lea eax, [esp + 0x14]
lea ecx, [esp + 0x34]
neg eax
sbb eax, eax
and eax, ecx
mov edx, dword [eax]
mov esi, dword [edx + 4]
add esi, eax
call ebx
mov dword [esi], eax
lea esi, [esp + 0x14]
neg esi
sbb esi, esi
lea eax, [esp + 0x28]
and esi, eax
mov ecx, dword [esi]
push ecx
call fcn.0043a0ac
mov edx, dword [esi + 8]
mov edi, dword [sym.imp.OLEAUT32.dll_SysStringLen]
add esp, 4
push edx
call edi
lea esi, [esp + 0x14]
lea eax, [esp + 0x18]
neg esi
sbb esi, esi
xor ebx, ebx
and esi, eax
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x46556a
mov cl, byte [eax - 1]
test cl, cl
je 0x465564
cmp cl, 0xff
je 0x465564
dec cl
mov byte [eax - 1], cl
jmp 0x46556a
add eax, 0xfffffffe
push eax
call edi
mov dword [esi + 4], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 4]
mov eax, dword [esp + edx + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
pop edi
pop esi
mov ecx, dword [esp + 0x60]
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x64
ret 4
Function at 0x100275f
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov ebx, ecx
test esi, esi
jne 0x100277a
push 0x80004005
call fcn.010021df
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
lea ecx, [eax + eax]
add esi, ecx
add edi, ecx
cmp eax, 1
jne 0x100277c
push edi
push dword [ebp + 0xc]
push 7
push 0
push dword [ebp + 8]
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
pop edi
pop esi
pop ebx
pop ebp
ret 8

Function at 0x1003138
Capabilities:
Query or enumerate registry key

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x224
mov eax, dword [0x100a060]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov eax, ecx
mov ecx, dword [ebp + 8]
push 0x2001f
push ecx
push dword [eax]
xor esi, esi
mov dword [ebp - 0x21c], ecx
lea ecx, [ebp - 0x214]
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x210], esi
mov dword [ebp - 0x20c], esi
call fcn.010026bd
mov edi, eax
cmp edi, esi
je 0x10031aa
lea ecx, [ebp - 0x214]
call fcn.0100264a
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.01006b28
leave
ret 4
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
jmp 0x10031c8
lea eax, [ebp - 0x204]
push eax
lea ecx, [ebp - 0x214]
call fcn.01003138
cmp eax, esi
jne 0x1003213
lea eax, [ebp - 0x224]
push eax
push esi
push esi
push esi
lea eax, [ebp - 0x208]
push eax
lea eax, [ebp - 0x204]
push eax
push esi
push dword [ebp - 0x214]
mov dword [ebp - 0x208], 0x100
call edi
test eax, eax
je 0x10031b2
lea ecx, [ebp - 0x214]
call fcn.0100264a
push dword [ebp - 0x21c]
mov ecx, dword [ebp - 0x218]
call fcn.010025c4
lea ecx, [ebp - 0x214]
mov esi, eax
call fcn.0100264a
mov eax, esi
jmp 0x100319a

Function at 0x100370d
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
push edi
xor esi, esi
push esi
push esi
push esi
push esi
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0x30], eax
cmp eax, esi
jne 0x100372e
xor eax, eax
jmp 0x1003754
push ebx
lea eax, [ebp - 4]
push eax
push esi
push edi
push 0x100308d
push esi
push esi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ebx, eax
cmp ebx, esi
jne 0x1003751
push dword [edi + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
pop ebx
pop edi
pop esi
leave
ret
Function at 0x1005d50
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x424
mov eax, 0x1008293
call fcn.01006c1e
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 0x424], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x42c], ecx
mov dword [ebp - 0x430], esi
mov dword [ebp - 0x418], esi
push 2
push esi
push eax
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov dword [ebp - 0x41c], eax
cmp eax, esi
jne 0x1005da9
call fcn.01002351
mov esi, eax
jmp 0x1005eb2
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, esi
jne 0x1005dc2
call fcn.01002351
jmp 0x1005ea4
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x428], eax
cmp eax, esi
je 0x1005db8
push edi
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
lea eax, [edi + 1]
mov dword [ebp - 0x420], edi
cmp eax, edi
jae 0x1005e28
lea eax, [ebp - 0x414]
cmp dword [ebp - 0x418], eax
je 0x1005e0e
lea ecx, [ebp - 0x418]
call fcn.01002e2d
mov esi, 0x8007000e
lea ecx, [ebp - 0x424]
call fcn.01002d3c
mov eax, esi
call fcn.01006c89
ret 0x10
push eax
lea ecx, [ebp - 0x418]
mov byte [ebp - 4], 2
call fcn.01003eee
mov dword [ebp - 4], 1
jmp 0x1005e56
cmp dword [ebp - 0x418], esi
jne 0x1005e65
mov esi, 0x8007000e
jmp 0x1005ea6
push edi
push dword [ebp - 0x418]
push edi
push dword [ebp - 0x428]
push esi
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, esi
je 0x1005db8
mov edx, dword [ebp - 0x418]
push dword [ebp + 0x14]
xor ecx, ecx
mov word [edx + eax*2], cx
push dword [ebp - 0x418]
lea ecx, [ebp - 0x430]
call fcn.0100588b
mov esi, eax
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x414]
cmp dword [ebp - 0x418], eax
je 0x1005e13
lea ecx, [ebp - 0x418]
call fcn.01002e2d
jmp 0x1005e13

Function at 0x100656f
Capabilities:
Check os version

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x100a060]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
call fcn.01006504
mov eax, 0x1000000
push 0x94
mov dword [esi + 8], eax
mov dword [esi + 4], eax
lea eax, [ebp - 0x98]
push 0
push eax
mov dword [esi], 0x3c
mov byte [esi + 0xc], 0
call sub.msvcrt.dll_memset
add esp, 0xc
lea eax, [ebp - 0x98]
push eax
mov dword [ebp - 0x98], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [ebp - 0x88], 2
jne 0x10065e2
cmp dword [ebp - 0x94], 5
jb 0x1006603
jmp 0x10065ff
cmp dword [ebp - 0x88], 1
jne 0x1006603
cmp dword [ebp - 0x94], 4
ja 0x10065ff
jne 0x1006603
cmp dword [ebp - 0x90], 0
jbe 0x1006603
mov byte [esi + 0xc], 1
lea ecx, [esi + 0x18]
mov dword [esi + 0x10], 0x800
mov dword [esi + 0x14], 0x10019ac
call fcn.010022e8
test eax, eax
jge 0x1006624
mov byte [0x100a39c], 1
mov ecx, dword [ebp - 4]
mov eax, esi
xor ecx, ebp
pop esi
call fcn.01006b28
leave
ret
Function at 0x1006960
Capabilities:
Terminate process

Disassembly:
push 0x5c
push 0x10088c0
call fcn.01006aa0
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov dword [ebp - 4], 0xfffffffe
mov dword [ebp - 4], 1
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov dword [ebp - 0x20], ebx
mov edi, 0x100a83c
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, ebx
je 0x100671b
cmp eax, esi
jne 0x100670e
xor esi, esi
inc esi
mov dword [ebp - 0x20], esi
jmp 0x100671e
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x10066f5
xor esi, esi
inc esi
mov eax, dword [0x100a838]
cmp eax, esi
jne 0x1006731
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x1006760
mov eax, dword [0x100a838]
test eax, eax
jne 0x100675a
mov dword [0x100a838], esi
push 0x100120c
push 0x1001200
call fcn.01006657
pop ecx
pop ecx
test eax, eax
je 0x1006760
jmp 0x1006884
mov dword [0x100a504], esi
mov eax, dword [0x100a838]
cmp eax, esi
jne 0x1006784
push 0x10011fc
push 0x10011e4
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x100a838], 2
cmp dword [ebp - 0x20], ebx
jne 0x1006791
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x100a84c], ebx
je 0x10067b2
push 0x100a84c
call fcn.010075a9
pop ecx
test eax, eax
je 0x10067b2
push ebx
push 2
push ebx
call dword [0x100a84c]
mov eax, dword [sym.imp.msvcrt.dll__wcmdln]
cmp dword [eax], ebx
je 0x1006884
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
movzx ecx, word [eax]
cmp cx, 0x20
ja 0x100681c
cmp cx, bx
je 0x10067d7
cmp dword [ebp - 0x1c], ebx
jne 0x100681c
movzx ecx, word [eax]
cmp cx, bx
je 0x10067ec
cmp cx, 0x20
ja 0x10067ec
inc eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x10067d7
test byte [ebp - 0x40], 1
je 0x10067f8
movzx ecx, word [ebp - 0x3c]
jmp 0x10067fb
push 0xa
pop ecx
push ecx
push eax
push ebx
push 0x1000000
call main
mov dword [0x100a500], eax
cmp dword [0x100a4f4], ebx
jne 0x1006861
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp cx, 0x22
jne 0x100682d
xor ecx, ecx
cmp dword [ebp - 0x1c], ebx
sete cl
mov dword [ebp - 0x1c], ecx
inc eax
inc eax
jmp 0x10067c1
cmp dword [0x100a504], ebx
jne 0x100686f
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x100a500]
jmp 0x1006890
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.01006ae5
ret
call fcn.010076f6
jmp 0x10066b8
Function at 0x40647b
Capabilities:
Allocate or change rwx memory
Create thread
Spawn thread to rwx shellcode

Disassembly:
push ebx
push ebp
push esi
push edi
push 0x40
push 0x1000
mov ebx, 0x4ac
xor ebp, ebp
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push ebx
mov edi, 0x479818
mov esi, eax
push edi
call fcn.00404d0d
push ebx
push edi
push esi
call fcn.0040b620
add esp, 0x14
call fcn.00404cf3
push ebp
push ebp
push 0x436018
lea eax, [esi + 0x188]
push eax
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x41f9b5
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041f657

Function at 0x41f9c0
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0041f7e6

Function at 0x41fdba
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.0040b5d0
mov eax, dword [0x479d00]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0041cfc4
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x41fdfc
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x41ff58
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00429c70
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x47b960]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00420f8a
mov ecx, dword [esi*4 + 0x47b960]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x41ff51
cmp eax, dword [edi + ecx + 0x24]
jne 0x41ff51
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41ff51
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00420f8a
add esp, 0x14
test edx, edx
jl 0x41ff51
jg 0x41fec7
test eax, eax
jb 0x41ff51
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x41ff51
jl 0x41fee1
cmp dword [ebp - 0x1008], eax
ja 0x41ff51
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41feff
test ebx, ebx
je 0x41ff38
cmp ecx, edi
jae 0x41ff38
mov al, byte [ecx]
cmp al, 0xd
jne 0x41ff19
lea eax, [edi - 1]
cmp ecx, eax
jae 0x41ff25
cmp byte [ecx + 1], 0xa
jne 0x41ff25
inc ecx
jmp 0x41ff25
movzx eax, al
movsx eax, byte [eax + 0x479fc8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41feff
cmp edx, ebx
jne 0x41feff
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x41ff56
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040a7e8
leave
ret
Function at 0x420428
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x47b960]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x420468
cmp byte [ebx], 0xa
jne 0x420468
or byte [eax + edi + 0x28], 4
jmp 0x42046d
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x42056b
mov al, byte [edx]
cmp al, 0x1a
je 0x42054d
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x42049c
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4204c1
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4204cb
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x42047e
jmp 0x42056b
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x420548
cmp dword [ebp - 0xc], 0
je 0x420548
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x47b960]
test byte [eax + edi + 0x28], 0x48
je 0x420522
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x42050d
mov byte [esi], dl
jmp 0x42051e
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x47b960]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x42056b
cmp byte [ebp - 1], 0xa
jne 0x420531
cmp esi, ebx
jne 0x420531
mov byte [esi], 0xa
jmp 0x42056a
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00420fa8
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x42056b
mov byte [esi], 0xd
jmp 0x42056a
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x47b960]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x420567
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x42056b
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x420574
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x47b960]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4205b7
cmp word [esi], dx
jne 0x4205b7
or byte [edi + eax + 0x28], 4
jmp 0x4205bc
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x42070f
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x4206ef
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4205fe
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x420634
cmp eax, edx
jae 0x420640
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x4205d6
jmp 0x42070f
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4206eb
cmp dword [ebp - 0x14], 0
je 0x4206eb
mov eax, dword [ebx*4 + 0x47b960]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4206c3
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x42068c
mov word [esi], cx
jmp 0x4206bf
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x47b960]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x47b960]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x47b960]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x42070f
pop ebx
cmp word [ebp - 4], bx
jne 0x4206d4
cmp esi, dword [ebp + 0xc]
jne 0x4206d4
mov word [esi], bx
jmp 0x42070c
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00420fa8
add esp, 0x10
cmp word [ebp - 4], bx
je 0x42070f
push 0xd
jmp 0x420708
mov ecx, dword [ebx*4 + 0x47b960]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x420706
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x42070f
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret