Function at 0x4b508c
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.004b5288
mov esi, dword [ebp + 8]
test esi, esi
je 0x4b50d9
push esi
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x4b50d9
push 0x5821a8
push esi
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp + 8], eax
test eax, eax
pop ecx
jne 0x4b50e2
push 0x38
push str.D:CQ2ClientCn_15.3.53DGameMapAoxPuzzle.cpp
push esi
push str.ERROR:_file__s_not_found_at__s___d
call fcn.005079e3
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 0x4b50d9
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 0x4b50d9
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.004b538c
mov ecx, dword [ebp - 4]
push edi
call fcn.004b5403
mov ecx, dword [ebp - 4]
push edi
call fcn.004b57f3
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 0x4b5201
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 0x4b51f6
lea ecx, [ebp - 0x38]
call fcn.004b7053
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.004b7089
movzx eax, byte [ebp + 0xb]
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], eax
jb 0x4b51b6
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 8]
jb 0x4b519c
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 0x4b5279
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.004b6f54
mov ecx, dword [ebp + 8]
inc dword [ebp - 0x10]
mov dword [eax], ecx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
jb 0x4b5225
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
mov al, bl
jmp 0x4b50db