Function at 0x49a7b0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5153d4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
mov dword [0x517428], 0xd371f947
push edi
mov dword [ebp - 0x14], ebx
mov dword [0x517424], 0xd371f947
mov dword [0x6e45b8], 0
mov byte [0x54d16b], 0
call fcn.004a2000
xor edi, edi
mov esi, 0x1800
mov ecx, 0x747724
nop
mov eax, edi
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
sar eax, 3
and eax, 0x1ffe
movsx eax, word [eax*2 + 0x4b95b0]
shl eax, 3
sar eax, 0xe
movd xmm0, eax
lea eax, [edi + 0x10000]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
sar eax, 3
and eax, 0x1ffe
cvtdq2ps xmm0, xmm0
movsx eax, word [eax*2 + 0x4b95b0]
shl eax, 3
sar eax, 0xe
movss dword [ecx - 4], xmm0
movd xmm0, eax
lea eax, [esi - 0x800]
sar eax, 3
and eax, 0x1ffe
cvtdq2ps xmm0, xmm0
movsx eax, word [eax*2 + 0x4b95b0]
shl eax, 3
sar eax, 0xe
movss dword [ecx], xmm0
movd xmm0, eax
mov eax, esi
sar eax, 3
and eax, 0x1ffe
cvtdq2ps xmm0, xmm0
movsx eax, word [eax*2 + 0x4b95b0]
shl eax, 3
sar eax, 0xe
movss dword [ecx + 4], xmm0
movd xmm0, eax
lea eax, [esi + 0x800]
sar eax, 3
and eax, 0x1ffe
cvtdq2ps xmm0, xmm0
movsx eax, word [eax*2 + 0x4b95b0]
shl eax, 3
sar eax, 0xe
movss dword [ecx + 8], xmm0
movd xmm0, eax
lea eax, [esi + 0x1000]
sar eax, 3
and eax, 0x1ffe
cvtdq2ps xmm0, xmm0
movsx eax, word [eax*2 + 0x4b95b0]
shl eax, 3
sar eax, 0xe
movss dword [ecx + 0xc], xmm0
movd xmm0, eax
lea eax, [esi + 0x1800]
sar eax, 3
and eax, 0x1ffe
cvtdq2ps xmm0, xmm0
movsx eax, word [eax*2 + 0x4b95b0]
shl eax, 3
sar eax, 0xe
movss dword [ecx + 0x10], xmm0
movd xmm0, eax
lea eax, [esi + 0x2000]
sar eax, 3
and eax, 0x1ffe
cvtdq2ps xmm0, xmm0
movsx eax, word [eax*2 + 0x4b95b0]
shl eax, 3
sar eax, 0xe
add esi, 0x4000
movss dword [ecx + 0x14], xmm0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [ecx + 0x18], xmm0
add edi, 0x80000
lea ecx, [ecx + 0x20]
cmp esi, 0x11800
jl 0x49a800
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49a987
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 8]
push 0
push eax
push 2
push 0x6e0db4
push ebx
call esi
mov ax, word [0x6e0db4]
mov ecx, 0x400
cmp ax, cx
ja 0x49b13b
mov ecx, dword [0x7cc7e8]
movsx edx, ax
lea eax, [edx + edx*4]
shl eax, 4
cmp eax, ecx
jg 0x49b15e
mov edi, dword [0x748da0]
sub ecx, eax
add dword [0x7cc7f0], eax
add eax, edi
mov dword [0x7cc7e8], ecx
mov dword [0x748da0], eax
mov dword [0x6e0d8c], edi
test edi, edi
jne 0x49a9f7
push str.LoadRoom__:_Could_not_allocate_memory_for_rooms
jmp 0x49b140
mov dword [ebp - 0x20], 0
test edx, edx
jle 0x49b075
xor ebx, ebx
nop dword [eax + eax]
mov eax, dword [0x7ccd70]
add eax, 4
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49aa33
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [edi + 0x14]
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 4
mov dword [ebx + edi + 0x18], 0
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49aa71
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [edi + 0x1c]
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 4
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49aaa7
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [edi + 0x20]
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 4
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49aadd
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [edi + 0x24]
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 4
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49ab13
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [ebp - 0x10]
mov ecx, dword [0x7cc7e8]
lea eax, [eax*2 + 3]
and eax, 0xfffffffc
cmp eax, ecx
jg 0x49b15e
add dword [0x7cc7f0], eax
sub ecx, eax
mov edx, dword [0x748da0]
add eax, edx
mov dword [0x748da0], eax
mov dword [ebx + edi], edx
mov eax, dword [ebp - 0x10]
mov dword [0x7cc7e8], ecx
mov dword [ebp - 0x1c], edx
lea ecx, [eax + eax]
mov eax, dword [0x7ccd70]
add eax, ecx
mov dword [ebp - 0x18], ecx
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49ab91
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x18]
push 0
lea eax, [ebp - 8]
push eax
push ecx
push edx
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49abc1
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 0x14]
call esi
mov ax, word [ebp - 0xc]
test ax, ax
jne 0x49abe8
mov dword [ebx + edi + 4], 0
jmp 0x49ac6e
mov edx, dword [0x7cc7e8]
cwde
shl eax, 5
add eax, 5
and eax, 0xfffffffc
cmp eax, edx
jg 0x49b138
add dword [0x7cc7f0], eax
sub edx, eax
mov ecx, dword [0x748da0]
add eax, ecx
mov dword [0x748da0], eax
mov dword [ebx + edi + 4], ecx
mov ax, word [ebp - 0xc]
mov word [ecx], ax
mov eax, dword [ebx + edi + 4]
movsx ecx, word [ebp - 0xc]
add eax, 2
shl ecx, 5
mov dword [ebp - 0x1c], eax
mov eax, dword [0x7ccd70]
add eax, ecx
mov dword [0x7cc7e8], edx
mov dword [ebp - 0x18], ecx
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49ac5f
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov ecx, dword [ebp - 0x18]
push 0
lea eax, [ebp - 8]
push eax
push ecx
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49ac91
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea ecx, [ebp - 8]
push ecx
lea eax, [edi + 0x28]
push 2
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49acc7
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadFile]
lea esi, [edi + 0x2a]
push 2
add esi, ebx
push esi
push dword [ebp - 0x14]
call eax
movsx eax, word [ebx + edi + 0x28]
movsx ecx, word [esi]
imul ecx, eax
mov eax, dword [0x7cc7e8]
mov dword [ebp - 0x10], ecx
shl ecx, 3
cmp ecx, eax
jg 0x49b134
mov esi, dword [0x748da0]
sub eax, ecx
add dword [0x7cc7f0], ecx
mov dword [0x7cc7e8], eax
mov dword [ebx + edi + 8], esi
lea eax, [esi + ecx]
mov dword [0x748da0], eax
mov eax, dword [ebp - 0x10]
lea ecx, [eax*8]
mov eax, dword [0x7ccd70]
add eax, ecx
mov dword [ebp - 0x18], ecx
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49ad4e
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov ecx, dword [ebp - 0x18]
push 0
lea eax, [ebp - 8]
push eax
push ecx
push esi
push dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49ad84
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [edi + 0x2c]
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49adba
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [edi + 0x2e]
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49adf0
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadFile]
lea esi, [edi + 0x30]
push 2
add esi, ebx
push esi
push dword [ebp - 0x14]
call eax
movzx eax, word [esi]
test ax, ax
jne 0x49ae1a
mov dword [ebx + edi + 0xc], 0
jmp 0x49ae86
cwde
lea esi, [eax + eax*2]
mov eax, dword [0x7cc7e8]
shl esi, 3
cmp esi, eax
jg 0x49b130
mov ecx, dword [0x748da0]
sub eax, esi
add dword [0x7cc7f0], esi
mov dword [0x7cc7e8], eax
mov dword [ebp - 0x18], ecx
lea eax, [ecx + esi]
mov dword [ebx + edi + 0xc], ecx
mov dword [0x748da0], eax
mov eax, dword [0x7ccd70]
add eax, esi
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49ae75
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov ecx, dword [ebp - 0x18]
push 0
lea eax, [ebp - 8]
push eax
push esi
push ecx
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49aea9
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
lea esi, [edi + 0x32]
push 2
add esi, ebx
push esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
movzx eax, word [esi]
test ax, ax
jne 0x49aed8
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov dword [ebx + edi + 0x10], 0
jmp 0x49af46
cwde
lea esi, [eax + eax*4]
mov eax, dword [0x7cc7e8]
shl esi, 2
cmp esi, eax
jg 0x49b130
mov ecx, dword [0x748da0]
sub eax, esi
add dword [0x7cc7f0], esi
mov dword [0x7cc7e8], eax
mov dword [ebp - 0x18], ecx
lea eax, [ecx + esi]
mov dword [ebx + edi + 0x10], ecx
mov dword [0x748da0], eax
mov eax, dword [0x7ccd70]
add eax, esi
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49af33
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov ecx, dword [ebp - 0x18]
push 0
lea eax, [ebp - 8]
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push ecx
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49af69
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [edi + 0x4c]
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49af9f
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [edi + 0x4e]
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
inc eax
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49afd3
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [edi + 0x36]
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49b009
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [edi + 0x34]
add eax, ebx
push eax
push dword [ebp - 0x14]
call esi
movzx eax, word [0x54d168]
or edx, 0xffffffff
mov ecx, dword [ebp - 0x20]
mov word [ebx + edi + 0x38], ax
inc ecx
movzx eax, word [0x54d160]
mov word [ebx + edi + 0x3c], ax
xor eax, eax
mov byte [ebx + edi + 0x37], 0
mov word [ebx + edi + 0x3e], ax
mov word [ebx + edi + 0x3a], ax
mov word [ebx + edi + 0x48], dx
mov word [ebx + edi + 0x4a], dx
add ebx, 0x50
movsx eax, word [0x6e0db4]
mov dword [ebp - 0x20], ecx
cmp ecx, eax
jge 0x49b072
mov edi, dword [0x6e0d8c]
jmp 0x49aa10
mov ebx, dword [ebp - 0x14]
call fcn.0046d9f0
mov eax, dword [0x7ccd70]
add eax, 4
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49b09d
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
push 4
lea eax, [ebp - 0x10]
push eax
push ebx
call esi
mov eax, dword [ebp - 0x10]
mov ecx, dword [0x7cc7e8]
lea edx, [eax + eax]
lea eax, [edx + 3]
mov dword [ebp - 0x18], edx
and eax, 0xfffffffc
cmp eax, ecx
jg 0x49b15e
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 [0x7475d8], edi
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49b10f
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov edx, dword [ebp - 0x18]
push 0
lea eax, [ebp - 8]
push eax
push edx
push edi
push ebx
call esi
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b557b
mov esp, ebp
pop ebp
ret
push eax
push esi
jmp 0x49b160
push eax
push ecx
jmp 0x49b160
push edx
jmp 0x49b15f
push str.LoadRoom__:_Too_many_rooms
push 0x748fb8
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, dword [ebp - 4]
xor eax, eax
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