Function at 0x49e691
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.0049e88d
mov esi, dword [ebp + 8]
test esi, esi
je 0x49e6de
push esi
call sub.MSVCRT.dll_strlen
test eax, eax
pop ecx
je 0x49e6de
push 0x55c5b8
push esi
call dword [sym.imp.MSVCRT.dll_fopen]
pop ecx
mov dword [ebp + 8], eax
test eax, eax
pop ecx
jne 0x49e6e7
push 0x38
push str.D:CQ2ClientRelease_11.17.103DGameMapAoxPuzzle.cpp
push esi
push str.ERROR:_file__s_not_found_at__s___d
call fcn.004e9e6f
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 0x49e6de
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 0x49e6de
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.0049e991
mov ecx, dword [ebp - 4]
push edi
call fcn.0049ea08
mov ecx, dword [ebp - 4]
push edi
call fcn.0049edf8
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 0x49e806
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 0x49e7fb
lea ecx, [ebp - 0x38]
call fcn.004a064d
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.004a0683
movzx eax, byte [ebp + 0xb]
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], eax
jb 0x49e7bb
inc dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 8]
jb 0x49e7a1
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 0x49e87e
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.004a054e
mov ecx, dword [ebp + 8]
inc dword [ebp - 0x10]
mov dword [eax], ecx
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 8]
jb 0x49e82a
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
pop ecx
mov al, bl
jmp 0x49e6e0