Function at 0x49c330
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [0x5153d4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x7ccd70]
push ebx
push esi
add eax, 4
mov dword [0x7ccd70], eax
push edi
mov edi, ecx
mov dword [ebp - 0x14], edi
cmp eax, 0x4000
jbe 0x49c36b
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 8]
push 0
push eax
push 4
lea eax, [ebp - 0xc]
push eax
push edi
call esi
mov ecx, dword [ebp - 0xc]
test ecx, ecx
je 0x49c700
cmp ecx, 0x400
jle 0x49c3b6
push str.LoadItems__:_Too_Many_Items_being_Loaded__
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
mov eax, dword [0x7cc7e8]
cmp eax, 0x21000
jl 0x49c716
mov ebx, dword [0x748da0]
sub eax, 0x21000
add dword [0x7cc7f0], 0x21000
mov dword [0x7cc7e8], eax
mov dword [0x6e0d88], ebx
lea eax, [ebx + 0x21000]
mov dword [0x748da0], eax
test ebx, ebx
jne 0x49c418
push str.LoadItems__:_Unable_to_allocate_memory_for_items
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
imul eax, ecx, 0x84
or edx, 0xffffffff
mov word [0x6e706c], dx
mov word [0x6e84b4], dx
lea edx, [ecx + 1]
mov dword [0x6e0da0], ecx
mov word [0x7b7b28], cx
add eax, ebx
cmp edx, 0x400
jge 0x49c474
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
mov edi, 0xfffe
and word [eax + 0x82], di
mov word [eax + 0x1a], dx
inc edx
mov byte [eax + 0x79], 0
add eax, 0x84
cmp edx, 0x400
jl 0x49c454
mov edi, dword [ebp - 0x14]
or edx, 0xffffffff
mov word [eax + 0x1a], dx
xor eax, eax
mov dword [ebp - 0x14], eax
test ecx, ecx
jle 0x49c6e3
mov dword [ebp - 0x10], eax
nop dword [eax + eax]
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c4b3
mov dword [0x7ccd70], 0
call fcn.00489cf0
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 8]
push 0
push ecx
add eax, 0xc
add eax, ebx
push 2
push eax
push edi
mov dword [ebp - 0x18], eax
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c4ed
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x18
push 2
add eax, ebx
push eax
push edi
call esi
mov eax, dword [0x7ccd70]
add eax, 4
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c524
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x40
push 4
add eax, ebx
push eax
push edi
call esi
mov eax, dword [0x7ccd70]
add eax, 4
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c55b
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x44
push 4
add eax, ebx
push eax
push edi
call esi
mov eax, dword [0x7ccd70]
add eax, 4
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c592
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x48
push 4
add eax, ebx
push eax
push edi
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c5c9
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x4e
push 2
add eax, ebx
push eax
push edi
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c600
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x2a
push 2
add eax, ebx
push eax
push edi
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c637
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x2c
push 2
add eax, ebx
push eax
push edi
call esi
mov eax, dword [0x7ccd70]
add eax, 2
mov dword [0x7ccd70], eax
cmp eax, 0x4000
jbe 0x49c66e
mov dword [0x7ccd70], 0
call fcn.00489cf0
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 0x10]
add eax, 0x28
push 2
add eax, ebx
push eax
push edi
call esi
mov eax, dword [ebp - 0x18]
movzx ecx, word [eax]
mov eax, 0x178
cmp cx, ax
ja 0x49c6b5
mov edx, dword [ebp - 0x14]
add dword [ebp - 0x10], 0x84
inc edx
mov ecx, dword [0x6e0da0]
mov dword [ebp - 0x14], edx
cmp edx, ecx
jge 0x49c6e3
mov ebx, dword [0x6e0d88]
jmp 0x49c490
mov eax, dword [ebp - 0x14]
push eax
movsx eax, cx
push eax
push str.LoadItems__:_Bad_Object_number___d__on_Item__d
push 0x748fb8
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b557b
mov esp, ebp
pop ebp
ret
xor esi, esi
test ecx, ecx
jle 0x49c700
nop dword [eax]
mov ecx, esi
call fcn.0043e3a0
inc esi
cmp esi, dword [0x6e0da0]
jl 0x49c6f0
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 eax
push 0x21000
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