Function at 0x50a5a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5bedcb
mov eax, dword fs:[0]
push eax
sub esp, 0x3bc
mov eax, dword [0x6ac30c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x314], edi
cmp edi, ebx
je 0x50a8e8
push 0x5c78a8
push edi
call fcn.0059a464
lea edx, [esi + 0x30]
add esp, 8
mov dword [esi + 4], eax
mov eax, edi
sub edx, edi
jmp 0x50a600
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x50a600
push 1
lea ecx, [ebp - 0x3c8]
call fcn.0050a360
push 0x40
push 0x21
push edi
lea ecx, [ebp - 0x3b8]
mov dword [ebp - 4], ebx
call fcn.00509c20
test eax, eax
jne 0x50a652
mov eax, dword [ebp - 0x3c8]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + ecx - 0x3bc]
lea ecx, [ebp + ecx - 0x3c8]
or eax, 2
cmp dword [ecx + 0x38], ebx
jne 0x50a673
or eax, 4
jmp 0x50a673
mov ecx, dword [ebp - 0x3c8]
mov ecx, dword [ecx + 4]
mov eax, dword [ebp + ecx - 0x390]
lea ecx, [ebp + ecx - 0x3c8]
neg eax
sbb eax, eax
and eax, 0xfffffffc
add eax, 4
push ebx
push eax
call fcn.005088d0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x364], ebx
je 0x50a8bd
mov edx, dword [esi + 4]
push 2
push ebx
push edx
call fcn.0059add0
mov eax, dword [esi + 4]
push eax
call fcn.0059d99b
mov ecx, dword [esi + 4]
push ebx
push ebx
push ecx
mov dword [ebp - 0x318], eax
call fcn.0059add0
mov eax, dword [esi + 0x28]
add esp, 0x1c
cmp eax, ebx
je 0x50a6c8
push eax
call fcn.00599f5a
add esp, 4
mov dword [esi + 0x28], ebx
mov edx, dword [esi + 4]
push edx
push 1
lea edi, [esi + 0x18]
push 0xc
push edi
mov dword [esi + 0x14], ebx
mov dword [esi + 0x2c], ebx
call fcn.0059b2f7
mov eax, dword [edi]
sub eax, dword [esi + 0x20]
add esp, 0x10
sub eax, dword [esi + 0x1c]
lea ecx, [esi + 0x134]
push eax
call fcn.00409240
test eax, eax
jne 0x50a753
push eax
push 0x3d
push str.MHFile.cpp
call fcn.0040b590
mov ecx, dword [ebp - 0x314]
push ecx
lea edx, [ebp - 0x110]
push str.Bin_File_Version_Error_____s
push edx
call fcn.0059a4c2
add esp, 0x18
push 0
push 0
lea eax, [ebp - 0x110]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x360]
mov dword [ebp - 4], 0xffffffff
call fcn.0050a490
lea ecx, [ebp - 0x360]
push ecx
jmp 0x50a8d6
lea ecx, [esi + 0x134]
call fcn.00409220
test eax, eax
je 0x50a828
mov edi, dword [ebp - 0x318]
add edi, 0xfffffff2
push edi
call fcn.00598cf4
add esp, 4
mov dword [esi + 0x28], eax
test eax, eax
jne 0x50a7a6
push eax
push 0x4e
push str.MHFile.cpp
call fcn.0040b590
add esp, 0xc
lea ecx, [ebp - 0x3c8]
mov dword [ebp - 4], 0xffffffff
call fcn.0050a540
jmp 0x50a8e8
push edi
push 0
push eax
call fcn.00599ee0
mov edx, dword [esi + 0x1c]
mov eax, dword [esi + 0x28]
mov ecx, dword [esi + 4]
add esp, 0xc
push edx
push edi
push eax
push ecx
lea ecx, [esi + 0x134]
call fcn.00409290
test eax, eax
jne 0x50a813
mov edx, dword [ebp - 0x314]
push edx
lea eax, [ebp - 0x310]
push str.File_Open_Error_:__s
push eax
call fcn.0059a4c2
add esp, 0xc
push 0
push 0
lea ecx, [ebp - 0x310]
push ecx
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x3c8]
mov dword [ebp - 4], 0xffffffff
call fcn.0050a540
jmp 0x50a8e8
mov edx, dword [esi + 4]
push edx
call fcn.0059a228
add esp, 4
mov dword [esi + 4], 0
jmp 0x50a892
mov eax, dword [esi + 4]
push eax
push 1
lea ecx, [esi + 0x24]
push 1
push ecx
call fcn.0059b2f7
mov eax, dword [esi + 0x20]
add esp, 0x10
test eax, eax
je 0x50a85f
push eax
call fcn.00598cf4
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0x20]
push edx
push ecx
push 1
push eax
mov dword [esi + 0x28], eax
call fcn.0059b2f7
add esp, 0x14
mov edx, dword [esi + 4]
push edx
push 1
lea eax, [esi + 0x25]
push 1
push eax
call fcn.0059b2f7
mov ecx, dword [esi + 4]
push ecx
call fcn.0059a228
add esp, 0x14
mov ecx, esi
mov dword [esi + 4], 0
call fcn.00507b80
test eax, eax
je 0x50a78f
lea ecx, [ebp - 0x3c8]
call fcn.0050a290
lea ecx, [ebp - 0x3c8]
mov dword [esi + 0x2c], 1
mov dword [ebp - 4], 0xffffffff
call fcn.0050a540
mov eax, 1
jmp 0x50a8ea
lea ecx, [ebp - 0x360]
mov dword [ebp - 4], 0xffffffff
call fcn.0050a490
lea edx, [ebp - 0x360]
push edx
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.005994a1
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00599821
mov esp, ebp
pop ebp
ret 4