Function at 0x465870
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x645300]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push ecx
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x14], ebx
cmp ebx, 0xffffffff
jne 0x4658bc
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00543bb1
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0xc]
push edi
push 0
push eax
push 2
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x465bfe
cmp dword [ebp - 0xc], 2
jne 0x465bfe
cmp word [ebp - 8], 0
jne 0x465bfe
push 0
lea eax, [ebp - 0xc]
push eax
push 2
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x465bfe
cmp dword [ebp - 0xc], 2
jne 0x465bfe
cmp word [ebp - 8], 1
jne 0x465bfe
push 0
lea eax, [ebp - 0xc]
push eax
push 2
lea eax, [ebp - 8]
push eax
push ebx
call esi
test eax, eax
je 0x465bfe
cmp dword [ebp - 0xc], 2
jne 0x465bfe
movzx edi, word [ebp - 8]
mov ecx, 0xffffffff
lea eax, [edi - 1]
shl eax, 5
add eax, 0x24
cmovb eax, ecx
push eax
call fcn.0056283f
mov esi, eax
add esp, 4
mov dword [ebp - 8], esi
test esi, esi
je 0x465bfe
mov ecx, 0x10
mov dword [esi], edi
mov eax, edi
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0056283f
mov ecx, eax
add esp, 4
mov dword [ebp - 0xc], ecx
test ecx, ecx
jne 0x46599b
push esi
call fcn.00560701
add esp, 4
jmp 0x465bfe
push 0
lea edx, [ebp - 0x10]
mov eax, edi
push edx
shl eax, 4
push eax
push ecx
push ebx
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x465bed
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0x10], eax
jne 0x465bed
xor ebx, ebx
test edi, edi
je 0x465a9e
mov edi, dword [ebp - 0xc]
add edi, 8
add esi, 0x1c
mov dword [ebp - 0x18], edi
nop dword [eax]
push dword [edi]
call fcn.0056283f
add esp, 4
mov dword [esi - 0xc], eax
test eax, eax
je 0x465bce
mov eax, dword [edi]
push 0
push 0
push dword [edi + 4]
mov dword [esi - 8], eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x465bab
push 0
lea eax, [ebp - 0x10]
push eax
push dword [edi]
push dword [esi - 0xc]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x465b8b
mov eax, dword [ebp - 0x10]
cmp eax, dword [edi]
jne 0x465b6b
lea eax, [esi - 0x18]
test eax, eax
je 0x465b25
mov ecx, dword [esi - 0xc]
cmp dword [ecx], 0x474e5089
je 0x465a6b
mov edx, 0x4849
lea eax, [ecx + 0xe]
mov dword [ebp - 0x1c], eax
cmp word [ecx + 0xc], dx
jne 0x465ac5
mov edx, 0x5244
cmp word [eax], dx
jne 0x465ac8
mov dword [esi - 4], 0
mov dword [esi - 0x18], 0
mov dword [esi - 0x14], 0
mov dword [esi - 0x10], 0
mov eax, dword [ebp - 8]
inc ebx
add edi, 0x10
add esi, 0x20
mov dword [ebp - 0x18], edi
cmp ebx, dword [eax]
jb 0x4659e0
mov esi, eax
push dword [ebp - 0xc]
call fcn.00560701
add esp, 4
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00543bb1
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0x1c], eax
mov dword [esi - 4], ecx
mov eax, dword [ecx + 4]
mov dword [esi - 0x18], eax
mov eax, dword [ecx + 8]
cdq
sub eax, edx
mov edi, eax
mov eax, dword [ebp - 0x1c]
sar edi, 1
mov dword [esi - 0x14], edi
movzx edx, word [ecx + 0xc]
movzx ecx, word [eax]
imul edx, ecx
mov ecx, dword [esi - 0xc]
mov dword [esi - 0x10], edx
call fcn.00464a40
mov dword [esi], eax
movzx edx, word [ecx + 0xc]
mov ecx, dword [ebp - 0x1c]
movzx ecx, word [ecx]
imul edx, ecx
mov ecx, dword [esi - 0xc]
imul edx, dword [ecx + 4]
add edx, 0x1f
sar edx, 3
and edx, 0xfffffffc
imul edx, edi
mov edi, dword [ebp - 0x18]
add edx, eax
mov dword [esi + 4], edx
jmp 0x465a87
test ebx, ebx
je 0x465b43
mov edi, dword [ebp - 8]
mov esi, ebx
add edi, 0x10
push dword [edi]
call fcn.00560701
add esp, 4
lea edi, [edi + 0x20]
sub esi, 1
jne 0x465b31
mov esi, dword [ebp - 8]
shl ebx, 5
push dword [ebx + esi + 0x10]
call fcn.00560701
push dword [ebp - 0xc]
call fcn.00560701
push esi
call fcn.00560701
add esp, 0xc
push dword [ebp - 0x14]
jmp 0x465bff
test ebx, ebx
je 0x465b43
mov edi, dword [ebp - 8]
mov esi, ebx
add edi, 0x10
push dword [edi]
call fcn.00560701
add esp, 4
lea edi, [edi + 0x20]
sub esi, 1
jne 0x465b77
jmp 0x465b43
test ebx, ebx
je 0x465b43
mov edi, dword [ebp - 8]
mov esi, ebx
add edi, 0x10
push dword [edi]
call fcn.00560701
add esp, 4
lea edi, [edi + 0x20]
sub esi, 1
jne 0x465b97
jmp 0x465b43
test ebx, ebx
je 0x465b43
mov edi, dword [ebp - 8]
mov esi, ebx
add edi, 0x10
push dword [edi]
call fcn.00560701
add esp, 4
lea edi, [edi + 0x20]
sub esi, 1
jne 0x465bb7
jmp 0x465b43
mov esi, dword [ebp - 8]
test ebx, ebx
je 0x465bea
lea edi, [esi + 0x10]
push dword [edi]
call fcn.00560701
add esp, 4
lea edi, [edi + 0x20]
sub ebx, 1
jne 0x465bd8
mov ebx, dword [ebp - 0x14]
push dword [ebp - 0xc]
call fcn.00560701
push esi
call fcn.00560701
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00543bb1
mov esp, ebp
pop ebp
ret