Function at 0x4b50c1
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
push edi
mov dword [ebp - 4], ecx
call fcn.004b52bd
mov esi, dword [ebp + 8]
test esi, esi
je 0x4b510e
push esi
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x4b510e
push 0x5811d4
push esi
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp + 8], eax
test eax, eax
pop ecx
jne 0x4b5117
push 0x38
push str.D:CQ2ClientCn_15.3.7_10183DGameMapAoxPuzzle.cpp
push esi
push str.ERROR:_file__s_not_found_at__s___d
call fcn.00507881
add esp, 0x10
xor al, al
pop edi
pop esi
pop ebx
leave
ret 4
mov esi, str.TqTerrain
lea edi, [ebp - 0x24]
movsd dword es:[edi], dword [esi]
push dword [ebp + 8]
xor eax, eax
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea edi, [ebp - 0x1a]
mov esi, dword [sym.imp.MSVCRT.dll_fread]
stosd dword es:[edi], eax
push 0x10
push 1
stosw word es:[edi], ax
pop ebx
lea eax, [ebp - 0x24]
push ebx
push eax
call esi
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x24]
push eax
call sub.MSVCRT.dll_strcmp
add esp, 0x18
test eax, eax
jne 0x4b510e
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x14]
push edi
push ebx
push 4
push eax
mov dword [ebp - 0x14], 0x3e8
call esi
add esp, 0x10
cmp dword [ebp - 0x14], 0x3e8
jne 0x4b510e
mov eax, dword [ebp - 4]
push edi
add eax, 8
push ebx
push 4
push eax
call esi
mov eax, dword [ebp - 4]
push edi
add eax, 0xc
push ebx
push 4
push eax
call esi
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 4]
add esp, 0x20
push dword [eax + 0xc]
add eax, 8
push dword [eax]
call fcn.004b53c1
mov ecx, dword [ebp - 4]
push edi
call fcn.004b5438
mov ecx, dword [ebp - 4]
push edi
call fcn.004b5828
and dword [ebp - 8], 0
push edi
push ebx
lea eax, [ebp - 8]
push 4
push eax
call esi
and dword [ebp - 0xc], 0
add esp, 0x10
cmp dword [ebp - 8], 0
jbe 0x4b5236
and byte [ebp + 0xb], 0
push edi
push ebx
lea eax, [ebp + 0xb]
push ebx
push eax
call esi
and dword [ebp - 0x10], 0
add esp, 0x10
cmp byte [ebp + 0xb], 0
jbe 0x4b522b
lea ecx, [ebp - 0x38]
call fcn.004b70ae
push edi
push ebx
lea eax, [ebp - 0x38]
push 2
push eax
call esi
push edi
push ebx
lea eax, [ebp - 0x34]
push 4
push eax
call esi
mov ecx, dword [ebp - 0xc]
add esp, 0x20
lea eax, [ebp - 0x38]
push eax
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x1c]
mov ecx, dword [eax + ecx*4]
call fcn.004b70e4
movzx eax, byte [ebp + 0xb]
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], eax
jb 0x4b51eb
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 8]
jb 0x4b51d1
and dword [ebp - 8], 0
push edi
push ebx
lea eax, [ebp - 8]
push 4
push eax
call esi
and dword [ebp - 0x10], 0
add esp, 0x10
cmp dword [ebp - 8], 0
jbe 0x4b52ae
mov eax, dword [ebp - 4]
add eax, 0x28
mov dword [ebp - 4], eax
or byte [ebp + 8], 0xff
push edi
push ebx
lea eax, [ebp - 0xc]
push 4
push eax
call esi
push edi
push ebx
lea eax, [ebp + 8]
push ebx
push eax
call esi
push edi
push ebx
lea eax, [ebp + 9]
push ebx
push eax
call esi
push edi
push ebx
lea eax, [ebp + 0xa]
push ebx
push eax
call esi
add esp, 0x40
lea eax, [ebp + 0xb]
push edi
push ebx
push ebx
push eax
call esi
mov ecx, dword [ebp - 4]
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
call fcn.004b6f7e
mov ecx, dword [ebp + 8]
inc dword [ebp - 0x10]
mov dword [eax], ecx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
jb 0x4b525a
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
mov al, bl
jmp 0x4b5110