joyce8/EMBER2024-capa huggingface dataset:
Function at 0x52367e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
mov eax, dword [0x562940]
xor eax, dword [ebp + 4]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 4], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x562958]
je 0x5236ab
inc eax
cmp eax, 0x12
jb 0x52369c
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x562958]
jne 0x5237df
mov eax, dword [0x56e230]
cmp eax, 1
je 0x5237ba
cmp eax, edx
jne 0x5236db
cmp dword [0x562394], 1
je 0x5237ba
cmp ecx, 0xfc
je 0x5237df
push 0x104
lea eax, [ebp - 0x10c]
push eax
push edx
mov byte [ebp - 8], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x523714
lea eax, [ebp - 0x10c]
push str._program_name_unknown_
push eax
call fcn.005231f0
pop ecx
pop ecx
lea eax, [ebp - 0x10c]
push eax
lea edi, [ebp - 0x10c]
call fcn.0051f6c0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x523756
lea eax, [ebp - 0x10c]
push eax
call fcn.0051f6c0
mov edi, eax
lea eax, [ebp - 0x10c]
sub eax, 0x3b
push 3
add edi, eax
push 0x553f20
push edi
call fcn.0051a040
add esp, 0x10
push edi
call fcn.0051f6c0
push dword [esi + 0x56295c]
mov ebx, eax
call fcn.0051f6c0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.00523e50
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.005231f0
push edi
push ebx
call fcn.00523200
push 0x532f08
push ebx
call fcn.00523200
push dword [esi + 0x56295c]
push ebx
call fcn.00523200
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.00529e1a
add esp, 0x2c
jmp 0x5237df
push edx
lea eax, [ebp + 8]
push eax
lea esi, [esi + 0x56295c]
push dword [esi]
call fcn.0051f6c0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x118]
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
call fcn.00523319
pop edi
pop esi
pop ebx
leave
ret
Function at 0x52775b
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
push edi
push 4
pop eax
call fcn.00523e50
mov ebx, esp
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x5277f0
mov edi, dword [ebp - 0x20]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x44]
lea esi, [eax - 1]
not esi
and esi, ebx
sub esi, eax
mov dword [ebp - 4], eax
mov eax, dword [0x56e1e0]
mov ecx, eax
dec ecx
neg ecx
sbb ecx, ecx
and ecx, 0xffff1000
add ecx, 0x11000
add ecx, edi
cmp esi, ecx
jb 0x5277f0
cmp eax, 1
je 0x527808
mov ebx, edi
mov edi, 0x1000
push 0x1c
lea eax, [ebp - 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x5277f0
add ebx, dword [ebp - 0x18]
test dword [ebp - 0x14], edi
je 0x5277c5
test byte [ebp - 0xf], 1
mov ebx, dword [ebp - 0x24]
je 0x5277ec
xor eax, eax
inc eax
jmp 0x527824
cmp esi, ebx
jae 0x5277f4
xor eax, eax
jmp 0x527824
push 4
push edi
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x56e1e0]
jmp 0x52780a
mov ebx, esi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 8]
push ecx
inc eax
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x54]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x528af0
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
xor ebx, ebx
cmp dword [ebp + 8], ebx
push esi
push edi
mov dword [ebp - 8], ebx
je 0x528b5b
push 0x3d
push dword [ebp + 8]
call fcn.0052ac3a
mov esi, eax
cmp esi, ebx
pop ecx
pop ecx
mov dword [ebp - 0xc], esi
je 0x528b5b
cmp dword [ebp + 8], esi
je 0x528b5b
xor eax, eax
cmp byte [esi + 1], al
sete al
mov dword [ebp - 4], eax
mov eax, dword [0x56e200]
cmp eax, dword [0x56e204]
jne 0x528b41
mov edi, eax
call fcn.00528a8f
mov dword [0x56e200], eax
cmp eax, ebx
jne 0x528b9a
cmp dword [ebp + 0xc], ebx
je 0x528b63
cmp dword [0x56e208], ebx
je 0x528b63
call fcn.0051f7f9
test eax, eax
je 0x528b9a
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
cmp dword [ebp - 4], ebx
jne 0x528c9e
push 4
call fcn.0051b1e7
cmp eax, ebx
pop ecx
mov dword [0x56e200], eax
je 0x528b5b
mov dword [eax], ebx
cmp dword [0x56e208], ebx
jne 0x528b9a
push 4
call fcn.0051b1e7
cmp eax, ebx
pop ecx
mov dword [0x56e208], eax
je 0x528b5b
mov dword [eax], ebx
mov ebx, dword [0x56e200]
mov edi, esi
mov esi, dword [ebp + 8]
sub edi, esi
push esi
call fcn.00528a42
mov edi, eax
test edi, edi
pop ecx
jl 0x528bf3
cmp dword [ebx], 0
je 0x528bf3
lea esi, [ebx + edi*4]
push dword [esi]
call fcn.0051ada8
xor eax, eax
cmp dword [ebp - 4], eax
pop ecx
jne 0x528bdb
mov eax, dword [ebp + 8]
mov dword [esi], eax
jmp 0x528c29
mov ecx, dword [esi + 4]
mov dword [esi], ecx
inc edi
add esi, 4
cmp dword [esi], eax
jne 0x528bd2
mov eax, edi
shl eax, 2
push eax
push ebx
call fcn.0051cc5f
test eax, eax
pop ecx
pop ecx
je 0x528c29
jmp 0x528c24
cmp dword [ebp - 4], 0
jne 0x528c97
test edi, edi
jge 0x528c03
neg edi
lea eax, [edi*4 + 8]
push eax
push ebx
call fcn.0051cc5f
test eax, eax
pop ecx
pop ecx
je 0x528b5b
lea ecx, [eax + edi*4]
and dword [ecx + 4], 0
mov dword [ecx], esi
mov dword [0x56e200], eax
cmp dword [ebp + 0xc], 0
je 0x528c80
push dword [ebp + 8]
call fcn.0051f6c0
inc eax
inc eax
push eax
call fcn.0051b1e7
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x528c80
push dword [ebp + 8]
push esi
call fcn.005231f0
mov eax, esi
sub eax, dword [ebp + 8]
pop ecx
add eax, dword [ebp - 0xc]
pop ecx
and byte [eax], 0
mov ecx, dword [ebp - 4]
inc eax
neg ecx
sbb ecx, ecx
not ecx
and ecx, eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
test eax, eax
jne 0x528c79
or dword [ebp - 8], 0xffffffff
push esi
call fcn.0051ada8
pop ecx
cmp dword [ebp - 4], 0
je 0x528c8f
push dword [ebp + 8]
call fcn.0051ada8
pop ecx
mov eax, dword [ebp - 8]
jmp 0x528b5e
push esi
call fcn.0051ada8
pop ecx
xor eax, eax
jmp 0x528b5e
Function at 0x529e1a
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x56e628], ebx
push esi
push edi
jne 0x529e9a
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x529ed5
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x53464c
push edi
call esi
test eax, eax
mov dword [0x56e628], eax
je 0x529ed5
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x56e62c], eax
call esi
cmp dword [0x56e1e0], 2
mov dword [0x56e630], eax
jne 0x529e9a
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x56e638], eax
je 0x529e9a
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x56e634], eax
mov eax, dword [0x56e634]
test eax, eax
je 0x529edf
call eax
test eax, eax
je 0x529ec6
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x56e638]
test eax, eax
je 0x529ec6
test byte [ebp - 8], 1
jne 0x529edf
cmp dword [0x56e1ec], 4
jb 0x529ed9
or byte [ebp + 0x12], 0x20
jmp 0x529efe
xor eax, eax
jmp 0x529f0e
or byte [ebp + 0x12], 4
jmp 0x529efe
mov eax, dword [0x56e62c]
test eax, eax
je 0x529efe
call eax
mov ebx, eax
test ebx, ebx
je 0x529efe
mov eax, dword [0x56e630]
test eax, eax
je 0x529efe
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x56e628]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x52acb5
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x100c
call fcn.00523e50
mov eax, dword [0x562940]
xor eax, dword [ebp + 4]
push ebx
push esi
push 1
xor esi, esi
push esi
push dword [ebp + 8]
mov dword [ebp - 4], eax
call fcn.005224b7
or ebx, 0xffffffff
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 8], eax
je 0x52addf
push 2
push esi
push dword [ebp + 8]
call fcn.005224b7
add esp, 0xc
cmp eax, ebx
je 0x52addf
push edi
mov edi, dword [ebp + 0xc]
sub edi, eax
test edi, edi
jle 0x52ad82
mov ebx, 0x1000
push ebx
lea eax, [ebp - 0x100c]
push esi
push eax
call fcn.00526510
push 0x8000
push dword [ebp + 8]
call fcn.0052b9c5
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp edi, ebx
mov eax, ebx
jge 0x52ad3b
mov eax, edi
push eax
lea eax, [ebp - 0x100c]
push eax
push dword [ebp + 8]
call fcn.00521610
add esp, 0xc
cmp eax, 0xffffffff
je 0x52ad5b
sub edi, eax
test edi, edi
jg 0x52ad33
jmp 0x52ad73
call fcn.005204e8
cmp dword [eax], 5
jne 0x52ad70
call fcn.005204df
mov dword [eax], 0xd
or esi, 0xffffffff
push dword [ebp - 0xc]
push dword [ebp + 8]
call fcn.0052b9c5
pop ecx
pop ecx
jmp 0x52adca
jge 0x52adca
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.005224b7
push dword [ebp + 8]
call fcn.00529118
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov esi, eax
neg esi
sbb esi, esi
neg esi
dec esi
cmp esi, ebx
jne 0x52adca
call fcn.005204df
mov dword [eax], 0xd
call fcn.005204e8
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
push 0
push dword [ebp - 8]
push dword [ebp + 8]
call fcn.005224b7
add esp, 0xc
mov eax, esi
pop edi
jmp 0x52ade1
mov eax, ebx
mov ecx, dword [ebp - 4]
xor ecx, dword [ebp + 4]
pop esi
pop ebx
call fcn.00523319
leave
ret
Function at 0x52b45e
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x5346a8
call fcn.0051f5d0
xor edi, edi
xor ebx, ebx
inc ebx
cmp dword [0x56e65c], edi
jne 0x52b4a2
push edi
push edi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x52b48d
mov dword [0x56e65c], ebx
jmp 0x52b4a2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x52b4a2
mov dword [0x56e65c], 2
mov eax, dword [0x56e65c]
cmp eax, ebx
jne 0x52b4c2
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
jmp 0x52b585
cmp eax, 2
je 0x52b4cb
cmp eax, edi
jne 0x52b4f3
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], edi
cmp dword [ebp + 0x18], edi
jne 0x52b4de
mov eax, dword [0x56e5e8]
mov dword [ebp + 0x18], eax
push edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
mov dword [ebp - 0x24], eax
cmp eax, edi
jne 0x52b4fa
xor eax, eax
jmp 0x52b585
mov dword [ebp - 4], edi
add eax, 3
and eax, 0xfffffffc
call fcn.00523e50
mov dword [ebp - 0x18], esp
mov esi, esp
mov dword [ebp - 0x28], esi
or dword [ebp - 4], 0xffffffff
jmp 0x52b52d
cmp esi, edi
jne 0x52b543
push dword [ebp - 0x24]
call fcn.0051b1e7
pop ecx
mov esi, eax
cmp esi, edi
je 0x52b4f3
mov dword [ebp - 0x20], ebx
push dword [ebp - 0x24]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
test eax, eax
je 0x52b576
cmp dword [ebp + 0x14], edi
jne 0x52b560
push edi
push edi
jmp 0x52b566
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push esi
push ebx
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], edi
je 0x52b582
push esi
call fcn.0051ada8
pop ecx
mov eax, dword [ebp - 0x1c]
lea esp, [ebp - 0x34]
call fcn.0051f60b
ret
Function at 0x52b58e
Capabilities:
Get geographical location

Disassembly:
push 0x18
push 0x5346b8
call fcn.0051f5d0
xor esi, esi
cmp dword [0x56e660], esi
jne 0x52b5d2
push esi
push esi
xor edi, edi
inc edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x52b5bd
mov dword [0x56e660], edi
jmp 0x52b5d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x52b5d2
mov dword [0x56e660], 2
mov eax, dword [0x56e660]
cmp eax, 2
je 0x52b6b3
cmp eax, esi
je 0x52b6b3
cmp eax, 1
jne 0x52b617
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x20], esi
cmp dword [ebp + 0x18], esi
jne 0x52b600
mov eax, dword [0x56e5e8]
mov dword [ebp + 0x18], eax
push esi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, esi
jne 0x52b61e
xor eax, eax
jmp 0x52b6c5
mov dword [ebp - 4], esi
lea eax, [ebx + ebx]
add eax, 3
and eax, 0xfffffffc
call fcn.00523e50
mov dword [ebp - 0x18], esp
mov edi, esp
mov dword [ebp - 0x28], edi
or dword [ebp - 4], 0xffffffff
jmp 0x52b654
cmp edi, esi
jne 0x52b66f
lea eax, [ebx + ebx]
push eax
call fcn.0051b1e7
pop ecx
mov edi, eax
cmp edi, esi
je 0x52b617
mov dword [ebp - 0x20], 1
push ebx
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
test eax, eax
je 0x52b6a2
push esi
push esi
cmp dword [ebp + 0x14], esi
jne 0x52b68c
push esi
push esi
jmp 0x52b692
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push 0xffffffffffffffff
push edi
push esi
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x20], esi
je 0x52b6ae
push edi
call fcn.0051ada8
pop ecx
mov eax, dword [ebp - 0x1c]
jmp 0x52b6c5
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
lea esp, [ebp - 0x34]
call fcn.0051f60b
ret
Function at 0x4022fd
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x20
mov eax, dword [0x4785c0]
xor eax, esp
mov dword [esp + 0x1c], eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0x30]
xor ebp, ebp
push edi
mov eax, dword [esi + 0x3c]
mov ebx, dword [eax + esi + 0x78]
add ebx, esi
mov edi, dword [ebx + 0x20]
mov eax, dword [ebx + 0x18]
add edi, esi
mov dword [esp + 0x10], eax
test eax, eax
je 0x402366
mov eax, dword [edi]
lea ecx, [esp + 0x14]
add eax, esi
push eax
call fcn.00401b4a
lea eax, [esp + 0x14]
push 0x235
push eax
call fcn.00403a65
pop ecx
pop ecx
cmp eax, dword [esp + 0x38]
je 0x40237e
lea ecx, [esp + 0x14]
add edi, 4
call fcn.00402e72
inc ebp
cmp ebp, dword [esp + 0x10]
jb 0x40232e
xor edi, edi
mov ecx, dword [esp + 0x2c]
lea eax, [esi + edi]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00406114
add esp, 0x20
ret
mov eax, dword [ebx + 0x24]
lea eax, [eax + ebp*2]
movzx ecx, word [eax + esi]
mov eax, dword [ebx + 0x1c]
lea eax, [eax + ecx*4]
mov edi, dword [eax + esi]
lea ecx, [esp + 0x14]
call fcn.00402e72
jmp 0x402368

Function at 0x403ee0
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ecx
push esi
push edi
mov edi, dword fs:[0x30]
mov edi, dword [edi + 0xc]
mov esi, dword [edi + 0xc]
mov eax, dword [esi]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov dword [0x4794f0], eax
push 0x27
push 0x478028
push 0x547
mov esi, 0x478050
push esi
call fcn.0040239c
push 0x8aafdc01
push dword [0x4794f0]
call fcn.004022fd
add esp, 0x18
lea ecx, [esp + 8]
push ecx
push 0x40
push 0x4e4
push esi
call eax
pop edi
pop esi
test eax, eax
je 0x403f40
call fcn.00403de5
xor eax, eax
pop ecx
ret 0x10

Function at 0x406ea6
Capabilities:
Parse pe header

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

Function at 0x414ca7
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x4261f0
push 0x4261e8
push str.FlsAlloc
push 0x1e
call fcn.00414b71
mov esi, eax
add esp, 0x10
test esi, esi
je 0x414cdb
push dword [ebp + 8]
mov ecx, esi
call dword [0x42212c]
call esi
jmp 0x414ce1
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x414d25
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x426200
push 0x4261f8
push str.FlsGetValue
push 0x20
call fcn.00414b71
mov esi, eax
add esp, 0x10
test esi, esi
je 0x414d5c
push dword [ebp + 8]
mov ecx, esi
call dword [0x42212c]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x418050
Capabilities:
Read file on windows

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

Function at 0x41844a
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00407010
mov eax, dword [0x4785c0]
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.004161cb
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x41848c
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4185e8
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.004218d0
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 + 0x479f90]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00419441
mov ecx, dword [esi*4 + 0x479f90]
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 0x4185e1
cmp eax, dword [edi + ecx + 0x24]
jne 0x4185e1
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 0x4185e1
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00419441
add esp, 0x14
test edx, edx
jl 0x4185e1
jg 0x418557
test eax, eax
jb 0x4185e1
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4185e1
jl 0x418571
cmp dword [ebp - 0x1008], eax
ja 0x4185e1
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x41858f
test ebx, ebx
je 0x4185c8
cmp ecx, edi
jae 0x4185c8
mov al, byte [ecx]
cmp al, 0xd
jne 0x4185a9
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4185b5
cmp byte [ecx + 1], 0xa
jne 0x4185b5
inc ecx
jmp 0x4185b5
movzx eax, al
movsx eax, byte [eax + 0x478898]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x41858f
cmp edx, ebx
jne 0x41858f
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4185e6
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00406114
leave
ret
Function at 0x4188df
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 + 0x479f90]
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 0x41891f
cmp byte [ebx], 0xa
jne 0x41891f
or byte [eax + edi + 0x28], 4
jmp 0x418924
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x418a22
mov al, byte [edx]
cmp al, 0x1a
je 0x418a04
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x418953
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x418978
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x418982
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 0x418935
jmp 0x418a22
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 0x4189ff
cmp dword [ebp - 0xc], 0
je 0x4189ff
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x479f90]
test byte [eax + edi + 0x28], 0x48
je 0x4189d9
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4189c4
mov byte [esi], dl
jmp 0x4189d5
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x479f90]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x418a22
cmp byte [ebp - 1], 0xa
jne 0x4189e8
cmp esi, ebx
jne 0x4189e8
mov byte [esi], 0xa
jmp 0x418a21
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0041945f
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x418a22
mov byte [esi], 0xd
jmp 0x418a21
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x479f90]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x418a1e
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x418a22
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x418a2b
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 + 0x479f90]
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 0x418a6e
cmp word [esi], dx
jne 0x418a6e
or byte [edi + eax + 0x28], 4
jmp 0x418a73
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 0x418bc6
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 0x418ba6
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x418ab5
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x418aeb
cmp eax, edx
jae 0x418af7
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 0x418a8d
jmp 0x418bc6
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 0x418ba2
cmp dword [ebp - 0x14], 0
je 0x418ba2
mov eax, dword [ebx*4 + 0x479f90]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x418b7a
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x418b43
mov word [esi], cx
jmp 0x418b76
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x479f90]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x479f90]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x479f90]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x418bc6
pop ebx
cmp word [ebp - 4], bx
jne 0x418b8b
cmp esi, dword [ebp + 0xc]
jne 0x418b8b
mov word [esi], bx
jmp 0x418bc3
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0041945f
add esp, 0x10
cmp word [ebp - 4], bx
je 0x418bc6
push 0xd
jmp 0x418bbf
mov ecx, dword [ebx*4 + 0x479f90]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x418bbd
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x418bc6
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