Function at 0x5212a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x6c0558]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
mov esi, ecx
mov dword [ebp - 0x208], edi
cmp edi, ebx
je 0x52139e
push 0x5996b0
push edi
call fcn.0057ac52
lea edx, [esi + 0x30]
add esp, 8
mov dword [esi + 4], eax
mov eax, edi
sub edx, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x5212e3
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x52139e
push 2
push ebx
push eax
call fcn.0057d664
mov eax, dword [esi + 4]
push eax
call fcn.0057d9ac
mov ecx, dword [esi + 4]
push ebx
push ebx
push ecx
mov dword [ebp - 0x20c], eax
call fcn.0057d664
mov eax, dword [esi + 0x28]
add esp, 0x1c
cmp eax, ebx
je 0x521331
push eax
call fcn.0057ae26
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.0057b235
mov eax, dword [edi]
sub eax, dword [esi + 0x1c]
add esp, 0x10
sub eax, dword [esi + 0x20]
lea ecx, [esi + 0x148]
push eax
call fcn.005741b0
test eax, eax
jne 0x5213b3
push eax
push 0x38
push str.MHFile.cpp
call fcn.00527020
mov ecx, dword [ebp - 0x208]
push ecx
lea edx, [ebp - 0x104]
push str.Bin_File_Version_Error_____s
push edx
call fcn.0057acb0
add esp, 0x18
push 0
push 0
lea eax, [ebp - 0x104]
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057ad52
mov esp, ebp
pop ebp
ret 4
lea ecx, [esi + 0x148]
call fcn.00574190
test eax, eax
je 0x52146d
mov edi, dword [ebp - 0x20c]
add edi, 0xfffffff2
push edi
call fcn.0057a0e8
add esp, 4
mov dword [esi + 0x28], eax
test eax, eax
jne 0x5213f1
push eax
push 0x49
push str.MHFile.cpp
call fcn.00527020
add esp, 0xc
jmp 0x52139e
push edi
push 0
push eax
call fcn.0057a7a0
mov ecx, dword [esi + 0x1c]
mov edx, dword [esi + 0x28]
mov eax, dword [esi + 4]
add esp, 0xc
push ecx
push edi
push edx
push eax
lea ecx, [esi + 0x148]
call fcn.005744a0
test eax, eax
jne 0x521443
mov ecx, dword [ebp - 0x208]
push ecx
lea edx, [ebp - 0x204]
push str.File_Open_Error_:__s
push edx
call fcn.0057acb0
add esp, 0xc
push 0
push 0
lea eax, [ebp - 0x204]
jmp 0x521395
mov ecx, dword [esi + 4]
push ecx
call fcn.0057a951
add esp, 4
mov eax, 1
pop edi
mov dword [esi + 4], ebx
mov dword [esi + 0x2c], eax
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0057ad52
mov esp, ebp
pop ebp
ret 4
mov edx, dword [esi + 4]
push edx
push 1
lea eax, [esi + 0x24]
push 1
push eax
call fcn.0057b235
mov eax, dword [esi + 0x20]
add esp, 0x10
test eax, eax
je 0x5214a4
push eax
call fcn.0057a0e8
mov ecx, dword [esi + 4]
mov edx, dword [esi + 0x20]
push ecx
push edx
push 1
push eax
mov dword [esi + 0x28], eax
call fcn.0057b235
add esp, 0x14
mov eax, dword [esi + 4]
push eax
push 1
lea ecx, [esi + 0x25]
push 1
push ecx
call fcn.0057b235
mov edx, dword [esi + 4]
push edx
call fcn.0057a951
add esp, 0x14
mov ecx, esi
mov dword [esi + 4], ebx
call fcn.00520600
test eax, eax
je 0x52139e
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
mov dword [esi + 0x2c], eax
pop esi
xor ecx, ebp
pop ebx
call fcn.0057ad52
mov esp, ebp
pop ebp
ret 4