Function at 0x460a88
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe90
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 0x170], edx
mov dword [ebp - 0xc], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x460de8
push dword fs:[eax]
mov dword fs:[eax], esp
xor esi, esi
lea eax, [ebp - 0x3c]
xor ecx, ecx
mov edx, 0x2c
call fcn.00403a84
mov eax, 0x4a84f4
call fcn.00405428
mov eax, 0x4a84f8
call fcn.00405428
push 0
push 0
push 3
push 0
push 3
push 0x80000000
push ebx
call sub.kernel32.dll_CreateFileA_1
mov ebx, eax
cmp ebx, 0xffffffff
je 0x460dc7
push 0
lea eax, [ebp - 0x10]
push eax
push 0x2c
lea eax, [ebp - 0x3c]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x10], 0x2c
jne 0x460dc1
lea eax, [ebp - 0x170]
lea edx, [ebp - 0x3c]
mov ecx, 0x10
call fcn.00405698
mov eax, dword [ebp - 0x170]
mov edx, 0x460e00
call fcn.00405a04
test eax, eax
je 0x460dc1
cmp dword [ebp - 0x2c], 0x700
jne 0x460dc1
push 0
push 0
mov eax, dword [ebp - 0x18]
push eax
push ebx
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0x10]
push eax
push 0x20
lea eax, [ebp - 0x5c]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x10], 0x20
jne 0x460dc1
cmp dword [ebp - 0x5c], 0x43decade
jne 0x460dc1
push 0
push 0
mov eax, dword [ebp - 0x54]
push eax
push ebx
call sub.kernel32.dll_SetFilePointer_1
push 0
lea eax, [ebp - 0x10]
push eax
push 0x10
lea eax, [ebp - 0x6c]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 0x10], 0x10
jne 0x460da9
cmp dword [ebp - 0x6c], 0x53decade
jne 0x460da9
xor edi, edi
xor eax, eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x16c]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00403a84
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 4]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x16c]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
add edi, 2
add edi, dword [ebp - 4]
lea eax, [ebp - 0xc]
lea edx, [ebp - 0x16c]
mov ecx, pe_nt_image_headers32
call fcn.00405698
cmp dword [ebp - 0xc], 0
je 0x460da0
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 4]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
mov eax, dword [ebp - 4]
mov byte [ebp - 5], al
movzx eax, byte [ebp - 5]
cmp eax, 4
jg 0x460c49
je 0x460c86
dec eax
je 0x460c60
dec eax
je 0x460c72
jmp 0x460d9a
sub eax, 0xfe
je 0x460d72
dec eax
je 0x460cea
jmp 0x460d9a
push 1
push 0
push 1
push ebx
call sub.kernel32.dll_SetFilePointer_1
inc edi
jmp 0x460da0
push 1
push 0
push 2
push ebx
call sub.kernel32.dll_SetFilePointer_1
add edi, 2
jmp 0x460da0
mov eax, dword [ebp - 0xc]
mov edx, 0x460e1c
call fcn.00405850
jne 0x460cd6
lea eax, [ebp - 0x16c]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00403a84
push 0
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 0x16c]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
mov eax, 0x4a84f4
lea edx, [ebp - 0x16c]
mov ecx, pe_nt_image_headers32
call fcn.00405698
or esi, 0xffffffff
jmp 0x460ce2
push 1
push 0
push 4
push ebx
call sub.kernel32.dll_SetFilePointer_1
add edi, 4
jmp 0x460da0
xor eax, eax
mov dword [ebp - 4], eax
push 0
lea eax, [ebp - 0x10]
push eax
push 2
lea eax, [ebp - 4]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
mov eax, dword [ebp - 0xc]
mov edx, 0x460e28
call fcn.00405850
jne 0x460d5c
cmp dword [ebp - 4], 0x11
jae 0x460d5c
test esi, esi
je 0x460d5c
lea eax, [ebp - 0x16c]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00403a84
push 0
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x16c]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
mov eax, 0x4a84f8
lea edx, [ebp - 0x16c]
mov ecx, pe_nt_image_headers32
call fcn.00405698
xor esi, esi
jmp 0x460d6a
push 1
push 0
mov eax, dword [ebp - 4]
push eax
push ebx
call sub.kernel32.dll_SetFilePointer_1
add edi, 2
add edi, dword [ebp - 4]
jmp 0x460da0
push 0
lea eax, [ebp - 0x10]
push eax
push 4
lea eax, [ebp - 4]
push eax
push ebx
call sub.kernel32.dll_ReadFile_1
push 1
push 0
mov eax, dword [ebp - 4]
push eax
push ebx
call sub.kernel32.dll_SetFilePointer_1
add edi, 4
add edi, dword [ebp - 4]
jmp 0x460da0
cmp dword [ebp - 0x68], 0
jne 0x460da9
cmp edi, dword [ebp - 0x60]
jb 0x460bb8
push 0
push 0
mov eax, dword [ebp - 0x68]
push eax
push ebx
call sub.kernel32.dll_SetFilePointer_1
cmp dword [ebp - 0x68], 0
jne 0x460b8d
push ebx
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x460def
lea eax, [ebp - 0x170]
call fcn.00405428
lea eax, [ebp - 0xc]
call fcn.00405428
ret