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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1004fd96
mov eax, dword fs:[0]
push eax
sub esp, 0xf4
mov eax, dword [0x1006a264]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0xd8]
mov esi, dword [ebp + 0xc]
push 0xc8
push 0
mov dword [ebp - 0x100], edi
push eax
mov dword [ebp - 0xf4], 0
call fcn.1002e790
add esp, 0xc
lea eax, [ebp - 0xd8]
push 0
push 0x100
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFinalPathNameByHandleA]
lea ecx, [ebp - 0xd8]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x100049d8
sub ecx, edx
jne 0x10004a0d
xorps xmm0, xmm0
movups xmmword [edi], xmm0
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], ecx
mov dword [edi + 0x10], ecx
mov dword [edi + 0x14], 0xf
mov byte [edi], cl
mov dword [ebp - 4], ecx
mov dword [ebp - 0xf4], 1
jmp 0x10004b1d
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
lea eax, [ebp - 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x10004a8c
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push eax
push 0
push 2
push 0
push esi
mov dword [ebp - 0xf8], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [ebp - 0xfc], eax
test eax, eax
je 0x10004a85
push dword [ebp - 0xf8]
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0xf8], eax
test eax, eax
jne 0x10004ac4
push dword [ebp - 0xfc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xorps xmm0, xmm0
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0xf
mov byte [edi], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xf4], 1
jmp 0x10004b1d
push eax
lea ecx, [ebp - 0xf0]
call fcn.10008320
mov dword [ebp - 4], 1
push dword [ebp - 0xf8]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [ebp - 0xfc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0xf0]
mov ecx, edi
push eax
call fcn.10008160
mov dword [ebp - 0xf4], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0xf0]
call fcn.10010010
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1002cba9
mov esp, ebp
pop ebp
ret
Function at 0x10004d40
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push 0
push 0
push 3
push 0
push 7
push 0x80000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x10004e19
push ebx
push edi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x10004e06
lea eax, [edi + 1]
push esi
push eax
call fcn.1002cbe3
mov ebx, eax
mov dword [ebp - 4], 0
add esp, 4
xor esi, esi
test ebx, ebx
je 0x10004d9f
mov byte [ebx + edi], 0
test edi, edi
je 0x10004dc6
push 0
lea eax, [ebp - 4]
push eax
mov eax, edi
sub eax, esi
push eax
lea eax, [esi + ebx]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10004de1
add esi, dword [ebp - 4]
cmp esi, edi
jb 0x10004da3
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x10004df4
pop esi
push dword [ebp - 8]
mov dword [eax], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
cmp esi, edi
jae 0x10004dc6
test ebx, ebx
je 0x10004df2
push ebx
call fcn.1002cbec
add esp, 4
xor ebx, ebx
pop esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebp - 8]
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x10008360
Capabilities:
Access peb ldr_data
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005058d
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x1006a264]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, ecx
mov dword [ebp - 0x10], eax
push 8
mov dword [eax], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.1002cb6b
mov esi, eax
add esp, 4
test esi, esi
je 0x100083b2
push 1
call fcn.10014d34
add esp, 4
mov dword [esi + 4], eax
jmp 0x100083b4
xor esi, esi
mov eax, dword [ebp - 0x10]
lea edi, [eax + 0x14]
lea ecx, [eax + 0x18]
lea edx, [eax + 0x24]
mov dword [eax + 0x34], esi
lea ebx, [eax + 4]
mov dword [eax + 0xc], ebx
lea esi, [eax + 8]
mov dword [eax + 0x10], esi
mov dword [eax + 0x1c], edi
mov dword [eax + 0x20], ecx
mov dword [eax + 0x2c], edx
add eax, 0x28
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebx + 0x30], eax
mov ebx, dword [ebp - 0x14]
mov dword [esi], 0
mov dword [ecx], 0
mov dword [eax], 0
mov dword [ebx], 0
mov dword [edi], 0
mov dword [edx], 0
mov dword [ebp - 4], 0
mov ebx, dword [ebp + 8]
mov ecx, ebx
mov esi, dword [ebp - 0x10]
not ecx
and ecx, 1
shl ecx, 2
mov edx, ecx
or edx, 2
mov dword [esi], vtable.std::basic_stringbuf_char__struct_std::char_traits_char___class_std::allocator_char__.0
test bl, 2
mov dword [esi + 0x38], 0
cmovne edx, ecx
mov ecx, edx
or ecx, 8
test bl, 8
cmove ecx, edx
mov eax, ecx
or eax, 0x10
test bl, 4
cmove eax, ecx
mov dword [esi + 0x3c], eax
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x100085c0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1005067f
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x1006a264]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
push 0
call fcn.100140d8
mov dword [ebp - 4], 0
mov dword [esi + 4], 0
mov byte [esi + 8], 0
mov byte [ebp - 4], 1
mov dword [esi + 0xc], 0
mov byte [esi + 0x10], 0
mov byte [ebp - 4], 2
xor eax, eax
mov dword [esi + 0x14], 0
mov word [esi + 0x18], ax
mov byte [ebp - 4], 3
mov dword [esi + 0x1c], eax
mov word [esi + 0x20], ax
mov byte [ebp - 4], 4
mov dword [esi + 0x24], eax
mov byte [esi + 0x28], al
mov byte [ebp - 4], 5
mov dword [esi + 0x2c], eax
mov byte [esi + 0x30], al
mov byte [ebp - 4], 6
mov eax, dword [ebp + 8]
test eax, eax
je 0x10008671
push eax
push esi
call fcn.10014e31
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret 4
push str.bad_locale_name
call fcn.1001462a
int3
Function at 0x10010c10
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
mov edx, 0x811c9dc5
push edi
mov edi, dword [ebp + 8]
mov ecx, 0
sub esi, edi
je 0x10010c41
nop dword [eax]
movzx eax, byte [ecx + edi]
inc ecx
xor eax, edx
imul edx, eax, 0x1000193
cmp ecx, esi
jb 0x10010c30
pop edi
mov eax, edx
pop esi
pop ebp
ret 8

Function at 0x10011e00
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10051d7e
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x1006a264]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x14], 0
push 8
mov dword [ebx + 0x30], 0
mov dword [ebx + 8], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 0x201
mov dword [ebx + 0x18], 6
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 0
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x2c], 0
mov dword [ebx + 0xc], 0
call fcn.1002cb6b
mov esi, eax
add esp, 4
test esi, esi
je 0x10011e9d
push 1
call fcn.10014d34
add esp, 4
mov dword [esi + 4], eax
jmp 0x10011e9f
xor esi, esi
mov eax, dword [ebp + 8]
mov dword [ebx + 0x30], esi
mov dword [ebx + 0x38], eax
mov dword [ebx + 0x3c], 0
mov dword [ebp - 4], 0
mov eax, dword [ebx + 0x30]
mov edi, dword [eax + 4]
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x18], edi
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x100541b8]
mov ecx, edi
call esi
lea eax, [ebp - 0x20]
mov dword [ebp - 0x14], 1
push eax
call fcn.10007590
mov edi, eax
add esp, 4
mov ecx, dword [edi]
push 0x20
mov esi, dword [ecx + 0x20]
mov ecx, esi
call dword [0x100541b8]
mov ecx, edi
call esi
mov ecx, 1
mov byte [ebp - 0xd], al
mov dword [ebp - 0x14], ecx
and ecx, 0xfffffffe
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], 0xffffffff
mov edi, dword [ebp - 0x18]
test edi, edi
je 0x10011f43
mov edx, dword [edi]
mov esi, dword [edx + 8]
mov ecx, esi
call dword [0x100541b8]
mov ecx, edi
call esi
mov edi, eax
test edi, edi
je 0x10011f43
mov ecx, dword [edi]
push 1
mov esi, dword [ecx]
mov ecx, esi
call dword [0x100541b8]
mov ecx, edi
call esi
cmp dword [ebx + 0x38], 0
mov al, byte [ebp - 0xd]
mov byte [ebx + 0x40], al
jne 0x10011f62
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 0x10]
and eax, 0x13
or eax, 4
mov dword [ebx + 0xc], eax
and ecx, eax
jne 0x10011f85
cmp byte [ebp + 0xc], 0
je 0x10011f71
push ebx
call fcn.10018083
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
test cl, 4
je 0x10011f91
mov esi, str.ios_base::badbit_set
jmp 0x10011fa1
test cl, 2
mov esi, str.ios_base::failbit_set
mov eax, str.ios_base::eofbit_set
cmove esi, eax
lea eax, [ebp - 0x20]
push 1
push eax
call fcn.100121b0
add esp, 8
lea ecx, [ebp - 0x34]
push eax
push esi
call fcn.10008d40
push 0x10066de4
lea eax, [ebp - 0x34]
push eax
call fcn.1002e0ed
int3
Function at 0x10013f40
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa4
mov eax, dword [0x1006a264]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
movups xmm1, xmmword [0x10055e30]
push esi
push edi
movzx ecx, byte [edx]
movzx eax, byte [edx + 1]
shl ecx, 8
or ecx, eax
mov edi, dword [ebp + 8]
movzx eax, byte [edx + 2]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 3]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 5]
mov dword [ebp - 0xa4], ecx
movzx ecx, byte [edx + 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 6]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 7]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 9]
mov dword [ebp - 0xa0], ecx
movzx ecx, byte [edx + 8]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xa]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xb]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xd]
mov dword [ebp - 0x9c], ecx
movzx ecx, byte [edx + 0xc]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx + 0xf]
shl ecx, 8
or ecx, eax
xor eax, eax
mov dword [ebp - 0x98], ecx
movups xmm0, xmmword [ebp - 0xa4]
pxor xmm1, xmm0
movups xmmword [ebp - 0x94], xmm1
nop dword [eax]
mov edx, dword [eax + 0x10055e40]
xor edx, dword [ebp + eax - 0x90]
xor edx, dword [ebp + eax - 0x8c]
xor edx, dword [ebp + eax - 0x88]
mov ecx, edx
shr ecx, 0x18
movzx esi, byte [ecx + 0x10055d30]
mov ecx, edx
shr ecx, 0x10
movzx ecx, cl
shl esi, 8
movzx ecx, byte [ecx + 0x10055d30]
or esi, ecx
mov ecx, edx
shr ecx, 8
movzx ecx, cl
shl esi, 8
movzx ecx, byte [ecx + 0x10055d30]
or esi, ecx
movzx ecx, dl
shl esi, 8
movzx ecx, byte [ecx + 0x10055d30]
or esi, ecx
mov edx, esi
mov ecx, esi
rol edx, 0xd
ror ecx, 9
xor edx, ecx
xor edx, dword [ebp + eax - 0x94]
xor edx, esi
mov dword [ebp + eax - 0x84], edx
mov dword [eax + edi], edx
add eax, 4
cmp eax, 0x80
jb 0x10014010
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.1002cba9
mov esp, ebp
pop ebp
ret
Function at 0x10018c70
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x10018c91
jl 0x10018c88
test edi, edi
jne 0x10018c91
xor eax, eax
xor edx, edx
jmp 0x10018d52
cmp dword [ebx + 0x38], 0
je 0x10018ca6
push eax
push edi
push dword [ebp + 8]
call fcn.10013430
jmp 0x10018d52
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x10018ced
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x10018ced
cmp eax, edi
jb 0x10018cc7
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.1002e210
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x10018cf3
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x10018d47
mov ecx, ebx
call fcn.10018610
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x10018d32
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.100397da
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x10018d47
jmp 0x10018d05
test edx, edx
je 0x10018d47
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.100397da
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc

Function at 0x1002c66b
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
call fcn.10034e7a
push 2
lea ecx, [ebp - 4]
push ecx
mov eax, dword [eax + 0x14]
push 0x22
push eax
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
movzx eax, word [ebp - 4]
sub eax, 0x30
je 0x1002c6aa
sub eax, 1
je 0x1002c6a5
sub eax, 1
je 0x1002c6a1
xor eax, eax
leave
ret
push 3
jmp 0x1002c6ac
xor eax, eax
inc eax
leave
ret
push 2
pop eax
leave
ret

Function at 0x1003c9b6
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x1003c9f5
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1003c9f5
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1003c9f5
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x1003c9f5
cmp dword [ecx + 0x74], 0xe
jbe 0x1003c9f5
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x1004244a
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1005b008
push 0x1005b000
push str.FlsAlloc
push 0x1f
call fcn.100422b5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1004247e
push dword [ebp + 8]
mov ecx, esi
call dword [0x100541b8]
call esi
jmp 0x10042484
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4
Function at 0x100424c8
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1005b018
push 0x1005b010
push str.FlsGetValue
push 0x21
call fcn.100422b5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100424ff
push dword [ebp + 8]
mov ecx, esi
call dword [0x100541b8]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10042507
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1005b020
push 0x1005b018
push str.FlsSetValue
push 0x22
call fcn.100422b5
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10042541
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x100541b8]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x10045ef1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.1002d110
mov eax, dword [0x1006a264]
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.10040bec
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x10045f33
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x1004608f
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1004f550
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 + 0x1006e148]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.10046c96
mov ecx, dword [esi*4 + 0x1006e148]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x10046088
cmp eax, dword [ecx + edi + 0x24]
jne 0x10046088
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10046088
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10046c96
add esp, 0x14
test edx, edx
jl 0x10046088
jg 0x10045ffe
test eax, eax
jb 0x10046088
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x10046088
jl 0x10046018
cmp dword [ebp - 0x1008], eax
ja 0x10046088
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x10046036
test ebx, ebx
je 0x1004606f
cmp ecx, edi
jae 0x1004606f
mov al, byte [ecx]
cmp al, 0xd
jne 0x10046050
lea eax, [edi - 1]
cmp ecx, eax
jae 0x1004605c
cmp byte [ecx + 1], 0xa
jne 0x1004605c
inc ecx
jmp 0x1004605c
movzx eax, al
movsx eax, byte [eax + 0x1006a4d0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x10046036
cmp edx, ebx
jne 0x10046036
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x1004608d
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.1002cba9
leave
ret
Function at 0x1004612e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x1006e148]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x1004616e
cmp byte [ebx], 0xa
jne 0x1004616e
or byte [edi + eax + 0x28], 4
jmp 0x10046173
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x10046272
mov dl, byte [eax]
cmp dl, 0x1a
je 0x10046255
inc eax
cmp dl, 0xd
je 0x1004619f
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x100461c5
cmp eax, ecx
jae 0x100461d3
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x10046187
jmp 0x10046272
push 0
lea eax, [ebp - 0x10]
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 0x10046250
cmp dword [ebp - 0x10], 0
je 0x10046250
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x1006e148]
test byte [eax + edi + 0x28], 0x48
je 0x1004622a
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10046215
mov byte [esi], dl
jmp 0x10046226
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1006e148]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x10046272
cmp byte [ebp - 1], 0xa
jne 0x10046239
cmp esi, ebx
jne 0x10046239
mov byte [esi], 0xa
jmp 0x10046271
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10046cb4
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x10046272
mov byte [esi], 0xd
jmp 0x10046271
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x1006e148]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x1004626f
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x10046272
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1004627b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x1006e148]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x100462c1
cmp word [ebx], dx
jne 0x100462c1
or byte [eax + edi + 0x28], 4
jmp 0x100462c6
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x10046429
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x10046409
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x10046307
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x1004633d
cmp eax, edx
jae 0x1004634b
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
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 - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x100462e2
jmp 0x10046429
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10046404
cmp dword [ebp - 0x18], 0
je 0x10046404
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x1006e148]
test byte [eax + edi + 0x28], 0x48
je 0x100463da
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x1004639e
mov word [esi], cx
jmp 0x100463d5
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x1006e148]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x1006e148]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x1006e148]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x10046429
pop eax
cmp word [ebp - 4], ax
jne 0x100463ea
cmp esi, ebx
jne 0x100463ea
mov word [esi], ax
jmp 0x10046426
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10046cb4
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x10046429
push 0xd
pop eax
jmp 0x100463e5
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x1006e148]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x10046423
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x10046429
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret