joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4de86b
Capabilities:
Check for time delay via gettickcount
Log keystrokes via polling

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
xor ebx, ebx
push 1
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebx
call edi
test ax, ax
jge 0x4de893
or dword [esi + 0x38], 1
or dword [esi + 0x34], 2
jmp 0x4de8a4
push 2
call edi
test ax, ax
jge 0x4de8a4
or dword [esi + 0x38], 2
or dword [esi + 0x34], 1
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
push dword [eax + 0x1c]
call dword [sym.imp.USER32.dll_SetCapture]
push eax
call fcn.004d2f8c
cmp dword [esi + 0x30], ebx
jne 0x4de97e
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
mov ebx, 0x100
call dword [sym.imp.USER32.dll_GetCapture]
push eax
call fcn.004d2f8c
cmp eax, dword [esp + 0x34]
jne 0x4de97e
push 1
push 0x209
push 0x200
lea eax, [esp + 0x20]
push 0
push eax
call edi
test eax, eax
jne 0x4de91a
push 1
push 0x108
push ebx
push eax
lea eax, [esp + 0x24]
push eax
call edi
test eax, eax
je 0x4de95f
mov eax, dword [esp + 0x18]
cmp eax, 0x202
je 0x4de97e
cmp eax, 0x205
je 0x4de97e
cmp eax, 0x201
je 0x4de97e
cmp eax, 0x204
je 0x4de97e
cmp eax, ebx
jne 0x4de945
cmp dword [esp + 0x1c], 0x1b
je 0x4de97e
push dword [esp + 0x2c]
lea eax, [esi + 0x20]
push dword [esp + 0x2c]
push eax
call dword [sym.imp.USER32.dll_PtInRect]
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x30], eax
call ebp
sub eax, dword [esp + 0x10]
cmp eax, dword [0x59563c]
jbe 0x4de974
mov dword [esi + 0x30], 1
cmp dword [esi + 0x30], 0
je 0x4de8d7
call dword [sym.imp.USER32.dll_ReleaseCapture]
mov eax, dword [esi + 0x30]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
Function at 0x10002570
Capabilities:
Access peb ldr_data
Contain obfuscated stackstrings
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x1000747f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x64
mov eax, 0x73
push ebx
push esi
mov word [esp + 0x2e], ax
mov ecx, 0x61
mov word [esp + 0x60], ax
mov word [esp + 0x62], ax
mov word [esp + 0x66], ax
push edi
lea eax, [esp + 0x28]
xor ebx, ebx
mov esi, 0x5c
mov edi, 0x65
mov edx, 0x72
mov word [esp + 0x3e], cx
mov word [esp + 0x56], cx
mov word [esp + 0x62], cx
push eax
lea ecx, [esp + 0x10]
mov dword [esp + 0x14], ebx
mov word [esp + 0x2c], si
mov word [esp + 0x2e], 0x52
mov word [esp + 0x30], di
mov word [esp + 0x32], 0x67
mov word [esp + 0x34], 0x69
mov word [esp + 0x38], 0x74
mov word [esp + 0x3a], dx
mov word [esp + 0x3c], 0x79
mov word [esp + 0x3e], si
mov word [esp + 0x40], 0x4d
mov word [esp + 0x44], 0x63
mov word [esp + 0x46], 0x68
mov word [esp + 0x48], 0x69
mov word [esp + 0x4a], 0x6e
mov word [esp + 0x4c], di
mov word [esp + 0x4e], si
mov word [esp + 0x50], 0x53
mov word [esp + 0x52], 0x6f
mov word [esp + 0x54], 0x66
mov word [esp + 0x56], 0x74
mov word [esp + 0x58], 0x77
mov word [esp + 0x5c], dx
mov word [esp + 0x5e], di
mov word [esp + 0x60], si
mov word [esp + 0x62], 0x43
mov word [esp + 0x64], 0x6c
mov word [esp + 0x6c], di
mov word [esp + 0x70], bx
call sub.MFC42u.DLL_CString::CString_1
lea ecx, [esp + 0x14]
mov dword [esp + 0x78], 1
push ecx
lea ecx, [esp + 0x10]
mov word [esp + 0x18], si
mov word [esp + 0x1a], 0x54
mov word [esp + 0x1c], 0x79
mov word [esp + 0x1e], 0x70
mov word [esp + 0x20], di
mov word [esp + 0x22], 0x4c
mov word [esp + 0x24], 0x69
mov word [esp + 0x26], 0x62
mov word [esp + 0x28], si
mov word [esp + 0x2a], bx
call sub.MFC42u.DLL_CString::operator
mov edx, dword [0x1000a2e4]
lea ecx, [esp + 0xc]
push edx
call sub.MFC42u.DLL_CString::operator
mov esi, dword [esp + 0x84]
push esi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
jbe 0x1000271a
push 0x1000a020
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::operator
push esi
lea ecx, [esp + 0x10]
call sub.MFC42u.DLL_CString::operator
mov esi, dword [esp + 0x80]
lea eax, [esp + 0xc]
push eax
mov ecx, esi
call sub.MFC42u.DLL_CString::CString_2
mov dword [esp + 0x10], 1
lea ecx, [esp + 0xc]
mov byte [esp + 0x78], bl
call sub.MFC42u.DLL_CString::CString
mov ecx, dword [esp + 0x70]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x70
ret
Function at 0x10003e30
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0xc]
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0xc]
mov byte [esi], 0
mov dword [eax], 0
cmp byte [edi], 0
je 0x10003e52
mov dword [eax], 1
mov al, byte [edi + 1]
mov byte [esp + 0x10], 0
test al, al
je 0x10003e64
xor al, 0x38
mov byte [esp + 0x10], al
mov ecx, dword [esp + 0x10]
xor eax, eax
and ecx, 0xff
jle 0x10003e81
mov dl, byte [edi + eax + 2]
xor dl, 0x38
mov byte [eax + esi], dl
inc eax
cmp eax, ecx
jl 0x10003e72
mov byte [ecx + esi], 0
pop edi
pop esi
ret

Function at 0x10004230
Capabilities:
Hash data with md5

Disassembly:
xor eax, eax
mov dword [ecx], 0x67452301
mov byte [ecx + 0x68], al
mov dword [ecx + 0x14], eax
mov dword [ecx + 0x10], eax
mov dword [ecx + 4], 0xefcdab89
mov dword [ecx + 8], 0x98badcfe
mov dword [ecx + 0xc], 0x10325476
ret

Function at 0x10005a90
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10008320
push 0x10007376
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1c
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x38], ecx
cmp word [ecx], 0x5a4d
jne 0x10005b2b
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp dword [eax], 0x4550
jne 0x10005b2b
mov edx, dword [eax + 0xd8]
lea edi, [edx + ecx]
mov esi, dword [ebp + 0xc]
cmp esi, edi
jb 0x10005b2b
mov eax, dword [eax + 0xdc]
add eax, edx
add eax, ecx
cmp esi, eax
jae 0x10005b2b
mov dword [ebp - 4], 0xffffffff
mov al, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10005be0
Capabilities:
Resume thread

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x1000cd1c], eax
je 0x10005bf6
mov eax, 0x10dd
pop ecx
ret
push ebp
push esi
mov esi, dword [0x1000cd2c]
xor ebp, ebp
cmp esi, ebp
push edi
je 0x10005c49
mov edx, dword [esi + 0x10]
mov ecx, dword [esi + 0x14]
lea eax, [esp + 0xc]
push eax
xor eax, eax
mov al, byte [edx + 0x17]
push ecx
mov ecx, dword [esi + 0xc]
push eax
push ecx
call fcn.10006ba0
cmp dword [esi + 4], ebp
jne 0x10005c38
mov eax, dword [esi + 0x10]
cmp eax, ebp
je 0x10005c38
push eax
call fcn.10005cc0
add esp, 4
mov dword [esi + 0x10], ebp
mov edi, dword [esi]
push esi
call sub.MFC42u.DLL_operatordelete
add esp, 4
cmp edi, ebp
mov esi, edi
jne 0x10005c05
mov dword [0x1000cd2c], ebp
call fcn.10005c90
mov esi, dword [0x1000cd28]
cmp esi, ebp
je 0x10005c7d
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edx, dword [esi + 4]
push edx
call ebx
mov edi, dword [esi]
push esi
call sub.MFC42u.DLL_operatordelete
add esp, 4
cmp edi, ebp
mov esi, edi
jne 0x10005c65
pop ebx
pop edi
mov dword [0x1000cd28], ebp
mov dword [0x1000cd1c], ebp
pop esi
xor eax, eax
pop ebp
pop ecx
ret
Function at 0x10005fb0
Capabilities:
Suspend thread

Disassembly:
mov eax, dword [0x1000cd20]
push esi
test eax, eax
push edi
jne 0x10006026
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, dword [esp + 0xc]
cmp edi, eax
je 0x10006024
push 8
call sub.MFC42u.DLL_operatornew
mov esi, eax
add esp, 4
test esi, esi
jne 0x10005fe0
mov edi, 8
jmp 0x10005ffd
push edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x10006014
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call sub.MFC42u.DLL_operatordelete
add esp, 4
mov dword [0x1000cd20], edi
mov eax, edi
pop edi
mov dword [0x1000cd24], 0
pop esi
ret 4
mov dword [esi + 4], edi
mov eax, dword [0x1000cd28]
mov dword [esi], eax
mov dword [0x1000cd28], esi
xor eax, eax
pop edi
pop esi
ret 4
Function at 0x100065a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10008330
push 0x10007376
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1c
lea eax, [ebp - 0x38]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x1000662a
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x34]
cmp word [eax], 0x5a4d
jne 0x10006623
mov ecx, dword [eax + 0x3c]
add ecx, eax
mov dword [ebp - 0x3c], ecx
cmp dword [ecx], 0x4550
jne 0x10006623
cmp word [ecx + 0x14], 0
mov dword [ebp - 4], 0xffffffff
je 0x1000662a
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x10006780
Capabilities:
Enumerate pe sections

Disassembly:
mov ecx, dword [esp + 4]
push ebx
push esi
push edi
mov eax, dword [ecx + 0x3c]
mov edi, dword [esp + 0x14]
add eax, ecx
xor ecx, ecx
mov cx, word [eax + 0x14]
mov edx, dword [ecx + eax + 0x24]
lea ecx, [ecx + eax + 0x18]
cmp edi, edx
jae 0x100067a8
mov eax, edi
pop edi
pop esi
pop ebx
ret
xor edx, edx
xor esi, esi
mov dx, word [eax + 6]
test edx, edx
jbe 0x100067cc
mov eax, dword [ecx + 0xc]
cmp edi, eax
jb 0x100067c4
mov ebx, dword [ecx + 8]
add ebx, eax
cmp edi, ebx
jb 0x100067d3
add ecx, 0x28
inc esi
cmp esi, edx
jb 0x100067b4
pop edi
pop esi
or eax, 0xffffffff
pop ebx
ret
mov eax, dword [ecx + 0x14]
mov edx, dword [ecx + 0xc]
sub eax, edx
add eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x100068b0
Capabilities:
Get common file path
Read file on windows

Disassembly:
sub esp, 0x200
push ebx
mov ebx, dword [esp + 0x208]
push ebp
mov ebp, dword [esp + 0x210]
push esi
push edi
push 0x5c
push ebx
mov dword [ebp], 0
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
jne 0x10006943
lea eax, [esp + 0x10]
push 0x200
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edi, 0x1000a1c4
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
jmp 0x10006961
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x1000a1c0
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x100069d4
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push esi
call ebx
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push esi
mov edi, eax
call ebx
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov ebx, eax
add esp, 0x20
test ebx, ebx
je 0x100069bd
push esi
push edi
push 1
push ebx
mov dword [ebp], edi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x200
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x200
ret
Function at 0x10006a80
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
mov eax, dword [0x1000cd9c]
push esi
test eax, eax
jne 0x10006add
push str.ZwProtectVirtualMemory
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 5
mov esi, eax
push 0x1000cd7c
push str.ntdll.dll
push esi
call fcn.100069f0
add esp, 0x10
test eax, eax
je 0x10006afb
add esi, 5
mov byte [0x1000cd81], 0x68
mov dword [0x1000cd82], esi
mov byte [0x1000cd86], 0xc3
mov dword [0x1000cd9c], 1
push 0x40
push 0x3000
push 0xb
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov esi, eax
test esi, esi
jne 0x10006b0b
or eax, 0xffffffff
pop esi
ret 0x14
mov eax, dword [0x1000cd9c]
test eax, eax
jne 0x10006add
or eax, 0xffffffff
pop esi
ret 0x14
mov ecx, dword [0x1000cd7c]
mov eax, esi
push edi
mov dword [eax], ecx
mov edx, dword [0x1000cd80]
mov dword [eax + 4], edx
mov cx, word [0x1000cd84]
mov word [eax + 8], cx
mov dl, byte [0x1000cd86]
mov ecx, dword [esp + 0x18]
mov byte [eax + 0xa], dl
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
push eax
mov eax, dword [esp + 0x14]
push ecx
mov ecx, dword [esp + 0x14]
push edx
push eax
push ecx
call esi
push 0x8000
push 0
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, edi
pop edi
pop esi
ret 0x14

Function at 0x10006ba0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x204
lea eax, [esp + 0x104]
push ebx
push ebp
push esi
push edi
push eax
call fcn.10006cc0
add esp, 4
lea ecx, [esp + 0x114]
push 0
push 0x80
push 3
push 0
push 1
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x10006c71
mov ebx, dword [esp + 0x220]
mov ebp, dword [esp + 0x224]
lea edx, [esp + 0x218]
lea ecx, [esp + 0x10]
mov dword [esp + 0x19], edx
push 0
push ecx
lea edx, [esp + 0x1c]
push 0x15
lea eax, [esp + 0x228]
push edx
push esi
mov dword [esp + 0x24], 0
mov byte [esp + 0x28], 1
mov dword [esp + 0x29], 0xffffffff
mov dword [esp + 0x31], eax
mov dword [esp + 0x35], ebx
mov dword [esp + 0x39], ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [esp + 0x10]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, 2
jne 0x10006ca5
mov eax, dword [esp + 0x21c]
mov ecx, dword [esp + 0x218]
push ebp
push ebx
push eax
push ecx
push 0xffffffffffffffff
call fcn.10006b70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret 0x10
mov edx, dword [esp + 0x224]
mov eax, dword [esp + 0x220]
mov ecx, dword [esp + 0x21c]
push edx
mov edx, dword [esp + 0x21c]
push eax
push ecx
push edx
push 0xffffffffffffffff
call fcn.10006b70
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret 0x10
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x204
ret 0x10
Function at 0x4020ea
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x2c
mov eax, dword [0x42e040]
xor eax, esp
mov dword [esp + 0x24], eax
push ebx
push ebp
push esi
mov esi, dword [0x488338]
xor ebx, ebx
push edi
mov dword [esp + 0x14], edx
mov eax, dword [esi + 0x3c]
mov ebp, dword [eax + esi + 0x78]
add ebp, esi
mov edi, dword [ebp + 0x20]
mov eax, dword [ebp + 0x18]
add edi, esi
mov dword [esp + 0x18], eax
test eax, eax
je 0x402151
mov eax, dword [edi]
lea ecx, [esp + 0x1c]
add eax, esi
push eax
call fcn.0040241e
lea ecx, [esp + 0x1c]
call fcn.00401f1a
cmp eax, dword [esp + 0x14]
je 0x402169
lea ecx, [esp + 0x1c]
add edi, 4
call fcn.004024ab
inc ebx
cmp ebx, dword [esp + 0x18]
jb 0x402121
xor edi, edi
mov ecx, dword [esp + 0x34]
lea eax, [esi + edi]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040693b
add esp, 0x2c
ret
mov edx, str.QwruxAA
call fcn.0040263e
push eax
call fcn.004028b7
mov eax, dword [ebp + 0x24]
pop ecx
lea eax, [eax + ebx*2]
movzx ecx, word [eax + esi]
mov eax, dword [ebp + 0x1c]
lea eax, [eax + ecx*4]
mov edi, dword [eax + esi]
lea ecx, [esp + 0x1c]
call fcn.004024ab
jmp 0x402153
Function at 0x416642
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.004162e4

Function at 0x41664d
Capabilities:
Read file on windows

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

Function at 0x416a47
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00407890
mov eax, dword [0x42e040]
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.00414d76
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x416a89
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x416be5
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004219d0
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 + 0x487ff8]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00417c17
mov ecx, dword [esi*4 + 0x487ff8]
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 0x416bde
cmp eax, dword [edi + ecx + 0x24]
jne 0x416bde
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 0x416bde
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00417c17
add esp, 0x14
test edx, edx
jl 0x416bde
jg 0x416b54
test eax, eax
jb 0x416bde
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x416bde
jl 0x416b6e
cmp dword [ebp - 0x1008], eax
ja 0x416bde
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x416b8c
test ebx, ebx
je 0x416bc5
cmp ecx, edi
jae 0x416bc5
mov al, byte [ecx]
cmp al, 0xd
jne 0x416ba6
lea eax, [edi - 1]
cmp ecx, eax
jae 0x416bb2
cmp byte [ecx + 1], 0xa
jne 0x416bb2
inc ecx
jmp 0x416bb2
movzx eax, al
movsx eax, byte [eax + 0x42e308]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x416b8c
cmp edx, ebx
jne 0x416b8c
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x416be3
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.0040693b
leave
ret
Function at 0x4170b5
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 + 0x487ff8]
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 0x4170f5
cmp byte [ebx], 0xa
jne 0x4170f5
or byte [eax + edi + 0x28], 4
jmp 0x4170fa
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4171f8
mov al, byte [edx]
cmp al, 0x1a
je 0x4171da
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x417129
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x41714e
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x417158
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 0x41710b
jmp 0x4171f8
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 0x4171d5
cmp dword [ebp - 0xc], 0
je 0x4171d5
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x487ff8]
test byte [eax + edi + 0x28], 0x48
je 0x4171af
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x41719a
mov byte [esi], dl
jmp 0x4171ab
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x487ff8]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4171f8
cmp byte [ebp - 1], 0xa
jne 0x4171be
cmp esi, ebx
jne 0x4171be
mov byte [esi], 0xa
jmp 0x4171f7
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00417c35
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4171f8
mov byte [esi], 0xd
jmp 0x4171f7
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x487ff8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4171f4
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4171f8
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x417201
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 + 0x487ff8]
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 0x417244
cmp word [esi], dx
jne 0x417244
or byte [edi + eax + 0x28], 4
jmp 0x417249
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 0x41739c
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 0x41737c
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x41728b
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4172c1
cmp eax, edx
jae 0x4172cd
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 0x417263
jmp 0x41739c
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 0x417378
cmp dword [ebp - 0x14], 0
je 0x417378
mov eax, dword [ebx*4 + 0x487ff8]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x417350
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x417319
mov word [esi], cx
jmp 0x41734c
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x487ff8]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x487ff8]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x487ff8]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x41739c
pop ebx
cmp word [ebp - 4], bx
jne 0x417361
cmp esi, dword [ebp + 0xc]
jne 0x417361
mov word [esi], bx
jmp 0x417399
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00417c35
add esp, 0x10
cmp word [ebp - 4], bx
je 0x41739c
push 0xd
jmp 0x417395
mov ecx, dword [ebx*4 + 0x487ff8]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x417393
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x41739c
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