Function at 0x407b30
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp + 8]
mov edx, dword [ecx + 0x28]
mov dword [ebp - 0xc], edx
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
cmp dword [esi + 0x2c], 0xffffffff
je 0x407b75
cmp dword [esi + 0x18], 0xffffffff
je 0x407b6a
cmp dword [esi + 0x18], 0
jne 0x407b75
push dword [esi + 0x2c]
call sub.KERNEL32.dll_GetStdHandle
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0xc]
or eax, eax
jne 0x407bfb
cmp dword [ebp - 0x18], 0
jbe 0x407dae
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
mov ebx, dword [ebp - 0x1c]
push ebx
mov ecx, dword [ebp + 8]
push dword [ecx + 0x18]
call sub.KERNEL32.dll_ReadFile
cmp eax, 1
jne 0x407bd3
cmp dword [ebp - 0x14], 0
je 0x407dae
mov eax, dword [ebp - 0x14]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 0x18]
sub ebx, dword [ebp - 0x14]
mov dword [ebp - 0x18], ebx
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
lea ecx, [ecx + edx]
mov dword [ebp - 0x1c], ecx
jmp 0x407bf0
mov eax, dword [ebp + 8]
cmp dword [eax + 0x2c], 0xffffffff
je 0x407be6
mov eax, dword [ebp + 8]
mov dword [eax + 0x18], 0xffffffff
push 0x413ef8
call fcn.0040198d
cmp dword [ebp - 0x18], 0
ja 0x407b8a
jmp 0x407dae
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 4]
cmp dword [eax], ebx
jge 0x407dae
mov eax, dword [ebp + 8]
mov ebx, 0x500000
mov eax, dword [eax]
cdq
idiv ebx
mov ecx, dword [ebp + 8]
mov esi, dword [ecx]
add esi, dword [ebp + 0x10]
mov edi, 0x500000
mov dword [ebp - 0x28], eax
mov eax, esi
cdq
idiv edi
mov ebx, dword [ebp - 0x28]
cmp ebx, eax
je 0x407d4a
push 0
push 0
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x24]
push ebx
call sub.KERNEL32.dll_FlushViewOfFile
or al, al
setne ch
movzx ecx, ch
push ecx
call fcn.00407a10
push 0
mov edx, dword [ebp + 8]
mov esi, dword [edx + 0x24]
push esi
call sub.KERNEL32.dll_UnmapViewOfFile
or al, al
setne ah
movzx edi, ah
push edi
call fcn.00407a10
mov eax, dword [ebp + 8]
mov dword [eax + 0x24], 0
mov ebx, dword [ebp + 8]
mov dword [ebx + 0x28], 0
push 0
mov ecx, dword [ebp + 8]
push dword [ecx + 0x20]
call sub.KERNEL32.dll_CloseHandle
or eax, eax
setne dh
movzx edx, dh
push edx
call fcn.00407a10
push 0
mov esi, dword [ebp + 8]
mov edi, dword [esi + 4]
push edi
push 0
mov ebx, dword [ebp + 8]
movzx ecx, byte [ebx + 0x10]
push dword [ecx*4 + 0x4124b8]
push 0
mov eax, dword [ebp + 8]
push dword [eax + 0x18]
call sub.KERNEL32.dll_CreateFileMappingA
mov edx, dword [ebp + 8]
mov dword [edx + 0x20], eax
push 0
mov esi, dword [ebp + 8]
cmp dword [esi + 0x20], 0
setne bh
movzx edi, bh
push edi
call fcn.00407a10
push 0
push 0
push 0
mov ebx, dword [ebp + 8]
movzx ecx, byte [ebx + 0x10]
push dword [ecx*4 + 0x4124a8]
mov eax, dword [ebp + 8]
push dword [eax + 0x20]
call sub.KERNEL32.dll_MapViewOfFile
mov edx, dword [ebp + 8]
mov dword [edx + 0x28], eax
push 0
mov esi, dword [ebp + 8]
mov edi, dword [esi + 0x28]
or edi, edi
setne bh
movzx ebx, bh
push ebx
call fcn.00407a10
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x28]
mov edx, dword [ebp + 8]
mov dword [edx + 0x24], eax
mov esi, dword [ebp + 8]
mov edi, dword [esi + 0x28]
mov dword [ebp - 0xc], edi
mov ebx, dword [ebp + 8]
push dword [ebx]
lea ecx, [ebp - 0xc]
push ecx
call fcn.00402750
add esp, 8
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
mov dword [edx + 0x28], eax
mov eax, dword [ebp + 8]
mov ebx, dword [eax]
add ebx, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
cmp dword [ecx + 4], ebx
jge 0x407d65
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 4]
sub ebx, dword [eax]
mov dword [ebp - 0x18], ebx
push dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
push eax
lea ebx, [ebp - 0xc]
push ebx
call fcn.00402680
add esp, 0xc
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x407d8d
push 0x413f84
call fcn.0040198d
jmp 0x407dae
cmp dword [ebp - 0x14], 0xfffffffe
jne 0x407d9f
push 0x413ef8
call fcn.0040198d
jmp 0x407dae
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp + 8]
mov dword [ecx + 0x28], ebx
mov eax, dword [ebp + 8]
mov ebx, dword [eax]
add ebx, dword [ebp - 0x10]
mov ecx, dword [ebp + 8]
mov dword [ecx], ebx
mov eax, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret 0xc