Function at 0x49c070
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x5153d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x7ccd70]
push ebx
add eax, 4
mov dword [0x7ccd70], eax
push esi
mov esi, ecx
push edi
cmp eax, 0x4000
jbe 0x49c0a8
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 8]
push 0
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push esi
call ebx
mov eax, dword [ebp - 0xc]
mov ecx, dword [0x7cc7e8]
lea edx, [eax + eax]
lea eax, [edx + 3]
mov dword [ebp - 0x10], edx
and eax, 0xfffffffc
cmp eax, ecx
jg 0x49c303
add dword [0x7cc7f0], eax
sub ecx, eax
mov edi, dword [0x748da0]
add eax, edi
mov dword [0x748da0], eax
mov eax, dword [0x7ccd70]
add eax, edx
mov dword [0x7cc7e8], ecx
mov dword [0x7475f8], edi
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c120
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov edx, dword [ebp - 0x10]
push 0
lea eax, [ebp - 8]
push eax
push edx
push edi
push esi
call ebx
mov eax, dword [0x7ccd70]
add eax, 4
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c14e
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push esi
call ebx
mov eax, dword [ebp - 0xc]
cmp eax, 0x4000
jle 0x49c18a
push str.Too_many_Textures_in_level
push 0x748fb8
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b557b
mov esp, ebp
pop ebp
ret
lea edi, [eax + eax*4]
mov eax, dword [0x7ccd70]
shl edi, 2
add eax, edi
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c1b2
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push edi
push 0x6f75d8
push esi
call ebx
mov edi, dword [ebp - 0xc]
xor esi, esi
mov dword [0x7475f4], edi
test edi, edi
jle 0x49c2e8
mov eax, 0x6f75e0
nop dword [eax]
movzx edx, word [eax - 4]
xor cl, cl
test dl, dl
jns 0x49c1fc
or edx, 0xff
xor ecx, ecx
mov word [eax - 4], dx
bts ecx, 0
jmp 0x49c200
mov byte [eax - 4], 0
movzx edx, word [eax - 2]
test dl, dl
jns 0x49c21b
or edx, 0xff
movzx ecx, cl
mov word [eax - 2], dx
bts ecx, 1
jmp 0x49c21f
mov byte [eax - 2], 0
movzx edx, word [eax]
test dl, dl
jns 0x49c238
or edx, 0xff
movzx ecx, cl
mov word [eax], dx
bts ecx, 2
jmp 0x49c23b
mov byte [eax], 0
movzx edx, word [eax + 2]
test dl, dl
jns 0x49c256
or edx, 0xff
movzx ecx, cl
mov word [eax + 2], dx
bts ecx, 3
jmp 0x49c25a
mov byte [eax + 2], 0
movzx edx, word [eax + 4]
test dl, dl
jns 0x49c275
or edx, 0xff
movzx ecx, cl
mov word [eax + 4], dx
bts ecx, 4
jmp 0x49c279
mov byte [eax + 4], 0
movzx edx, word [eax + 6]
test dl, dl
jns 0x49c294
or edx, 0xff
movzx ecx, cl
mov word [eax + 6], dx
bts ecx, 5
jmp 0x49c298
mov byte [eax + 6], 0
movzx edx, word [eax + 8]
test dl, dl
jns 0x49c2b3
or edx, 0xff
movzx ecx, cl
mov word [eax + 8], dx
bts ecx, 6
jmp 0x49c2b7
mov byte [eax + 8], 0
movzx edx, word [eax + 0xa]
test dl, dl
jns 0x49c2d2
or edx, 0xff
movzx ecx, cl
mov word [eax + 0xa], dx
bts ecx, 7
jmp 0x49c2d6
mov byte [eax + 0xa], 0
mov byte [esi + 0x7c8368], cl
add eax, 0x14
inc esi
cmp esi, edi
jl 0x49c1e0
call fcn.0049d4f0
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004b557b
mov esp, ebp
pop ebp
ret
push ecx
push eax
push str.game_malloc__:_OUT_OF_MEMORY._Needed:__d__Free:__d
push 0x748fb8
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ecx, 0x748fb8
call fcn.004ad960
int3