Function at 0x458340
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x4bef0e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x834
mov edx, dword [esp + 0x844]
push ebx
xor ebx, ebx
push ebp
push esi
cmp edx, ebx
push edi
mov dword [esp + 0x1c], ecx
je 0x458505
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x458505
push ebx
push 0x80
push 3
push ebx
push ebx
push SysReAllocString
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x458505
mov eax, dword [esp + 0x85c]
mov ecx, dword [esp + 0x858]
push ebx
push ebx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov ebp, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], ebx
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x20]
push 2
push eax
push esi
call ebp
cmp dword [esp + 0x10], 2
jne 0x4584f3
mov edx, dword [esp + 0x18]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
push eax
and edx, 0xffff
push ecx
lea eax, [esp + 0x4c]
push edx
push eax
push esi
call ebp
lea ecx, [esp + 0x44]
push 0
push ecx
call fcn.004032c0
lea edx, [esp + 0x4c]
push str._CHARAFILEMACRO_
push edx
call fcn.004b3980
add esp, 0x10
test eax, eax
jne 0x45843a
mov dword [esp + 0x14], 1
lea eax, [esp + 0x44]
push str._END_
push eax
call fcn.004b3980
add esp, 8
test eax, eax
je 0x4584fa
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4583ce
lea edi, [esp + 0x44]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4583ce
lea ecx, [esp + 0x44]
push 0x3d
push ecx
call fcn.00403240
add esp, 8
cmp eax, 1
jne 0x4583ce
lea edx, [esp + 0x24]
push 0x20
push edx
push 0x3d
lea eax, [esp + 0x50]
push 0
push eax
call fcn.00402750
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4583ce
lea ecx, [esp + 0x444]
push 0x400
push ecx
push 0x3d
lea edx, [esp + 0x50]
push 1
push edx
call fcn.00402750
lea edi, [esp + 0x458]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x4583ce
inc ebx
jmp 0x4583ce
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x458522
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, dword [esp + 0x844]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x840
ret 0xc
lea eax, [ebx + ebx*4]
lea ecx, [ebx + eax*2]
lea edx, [ecx*4 + 4]
push edx
call fcn.004b099c
add esp, 4
mov dword [esp + 0x20], eax
test eax, eax
mov dword [esp + 0x84c], 0
je 0x458567
push fcn.00457d10
push 0x457cf0
lea edi, [eax + 4]
push ebx
push 0x2c
push edi
mov dword [eax], ebx
call fcn.004b1ed6
mov eax, edi
jmp 0x458569
xor eax, eax
mov ecx, dword [esp + 0x1c]
push 0
push 0
mov dword [esp + 0x854], 0xffffffff
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x864]
mov dword [ecx + 8], ebx
mov ecx, dword [esp + 0x860]
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov dword [esp + 0x10], eax
xor ebx, ebx
lea edx, [esp + 0x10]
push 0
push edx
lea eax, [esp + 0x20]
push 2
push eax
push esi
call ebp
cmp dword [esp + 0x10], 2
jne 0x4586e1
mov edx, dword [esp + 0x18]
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
push eax
and edx, 0xffff
push ecx
lea eax, [esp + 0x4c]
push edx
push eax
push esi
call ebp
lea ecx, [esp + 0x44]
push 0
push ecx
call fcn.004032c0
lea edx, [esp + 0x4c]
push str._CHARAFILEMACRO_
push edx
call fcn.004b3980
add esp, 0x10
test eax, eax
jne 0x45860b
mov dword [esp + 0x14], 1
lea eax, [esp + 0x44]
push str._END_
push eax
call fcn.004b3980
add esp, 8
test eax, eax
je 0x4586e8
mov eax, dword [esp + 0x14]
test eax, eax
je 0x45859f
lea edi, [esp + 0x44]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x45859f
lea ecx, [esp + 0x44]
push 0x3d
push ecx
call fcn.00403240
add esp, 8
cmp eax, 1
jne 0x45859f
lea edx, [esp + 0x24]
push 0x20
push edx
push 0x3d
lea eax, [esp + 0x50]
push 0
push eax
call fcn.00402750
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x45859f
lea ecx, [esp + 0x444]
push 0x400
push ecx
push 0x3d
lea edx, [esp + 0x50]
push 1
push edx
call fcn.00402750
lea edi, [esp + 0x458]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x14
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x45859f
mov edx, dword [esp + 0x1c]
lea eax, [esp + 0x444]
lea ecx, [esp + 0x24]
push eax
push ecx
mov ecx, dword [edx + 4]
add ecx, ebx
call fcn.00457d70
add ebx, 0x2c
jmp 0x45859f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
jmp 0x458507