Function at 0x507d80
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
mov eax, dword [0x6a12a0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, ecx
test ebx, ebx
jne 0x507db2
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058e944
mov esp, ebp
pop ebp
ret 4
push 0x5bf8a0
push ebx
call fcn.0058fcdb
lea edx, [edi + 0x2e]
mov dword [edi + 4], eax
add esp, 8
mov ecx, ebx
sub edx, ebx
lea ebx, [ebx]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x507dd0
mov eax, dword [edi + 4]
test eax, eax
je 0x507d9e
push 2
push 0
push eax
call fcn.005903c4
push dword [edi + 4]
call fcn.00593599
push 0
push 0
push dword [edi + 4]
mov dword [ebp - 0x208], eax
call fcn.005903c4
mov ecx, dword [edi + 0x26]
add esp, 0x1c
test ecx, ecx
je 0x507e22
push ecx
call fcn.0058f848
add esp, 4
mov dword [edi + 0x26], 0
push esi
push dword [edi + 4]
lea esi, [edi + 0x18]
mov dword [edi + 0x14], 0
push 1
push 0xc
push esi
mov dword [edi + 0x2a], 0
call fcn.00590289
mov eax, dword [esi]
lea ecx, [edi + 0x132]
sub eax, dword [edi + 0x1c]
add esp, 0x10
sub eax, dword [edi + 0x20]
push eax
call fcn.0040c2b0
test eax, eax
jne 0x507ea6
push eax
push 0x3d
push str.MHFile.cpp
call fcn.0040f8c0
push ebx
lea eax, [ebp - 0x104]
push str.Bin_File_Version_Error_____s
push eax
call fcn.0058feac
add esp, 0x18
lea eax, [ebp - 0x104]
push 0
push 0
push eax
push 0
call dword [0x5bf2c0]
pop esi
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058e944
mov esp, ebp
pop ebp
ret 4
lea ecx, [edi + 0x132]
call fcn.0040c290
test eax, eax
je 0x507f5e
mov esi, dword [ebp - 0x208]
add esi, 0xfffffff2
push esi
call fcn.0058d8aa
add esp, 4
mov dword [edi + 0x26], eax
test eax, eax
jne 0x507ee4
push eax
push 0x4e
push str.MHFile.cpp
call fcn.0040f8c0
add esp, 0xc
jmp 0x507e91
push esi
push 0
push eax
call fcn.0058f850
add esp, 0xc
lea ecx, [edi + 0x132]
push dword [edi + 0x1c]
push esi
push dword [edi + 0x26]
push dword [edi + 4]
call fcn.0040c040
test eax, eax
jne 0x507f2d
push ebx
lea eax, [ebp - 0x204]
push str.File_Open_Error_:__s
push eax
call fcn.0058feac
add esp, 0xc
lea eax, [ebp - 0x204]
push 0
push 0
jmp 0x507e88
push dword [edi + 4]
call fcn.0058fba0
add esp, 4
mov dword [edi + 4], 0
mov dword [edi + 0x2a], 1
mov eax, 1
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0058e944
mov esp, ebp
pop ebp
ret 4
push dword [edi + 4]
lea eax, [edi + 0x24]
push 1
push 1
push eax
call fcn.00590289
mov eax, dword [edi + 0x20]
add esp, 0x10
test eax, eax
je 0x507f92
push eax
call fcn.0058d8aa
push dword [edi + 4]
mov dword [edi + 0x26], eax
push dword [edi + 0x20]
push 1
push eax
call fcn.00590289
add esp, 0x14
push dword [edi + 4]
lea eax, [edi + 0x25]
push 1
push 1
push eax
call fcn.00590289
push dword [edi + 4]
call fcn.0058fba0
add esp, 0x14
mov dword [edi + 4], 0
mov ecx, edi
call fcn.005071d0
test eax, eax
je 0x507e91
mov ecx, edi
call fcn.00507120
test eax, eax
je 0x507e91
mov ecx, dword [ebp - 4]
mov eax, 1
pop esi
mov dword [edi + 0x2a], 1
xor ecx, ebp
pop edi
pop ebx
call fcn.0058e944
mov esp, ebp
pop ebp
ret 4