Function at 0x10006490
Capabilities:
Read file on windows

Disassembly:
push ecx
cmp dword [ecx], 1
push esi
mov dword [esp + 4], ecx
jne 0x100064c6
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0xc]
push 0
push eax
push esi
call dword [sym.imp.MSVCR71.dll__lseek]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
push ecx
push edx
push esi
call dword [sym.imp.MSVCR71.dll__read]
add esp, 0x18
pop esi
pop ecx
ret 0x10
mov ecx, dword [0x1005d210]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
xor ebx, ebx
test ecx, ecx
push edi
mov edi, dword [esp + 0x20]
jle 0x1000653c
mov esi, 0x1005d208
mov eax, dword [esp + 0x18]
cmp dword [esi - 4], eax
jne 0x10006534
mov eax, dword [esi - 0xc]
test eax, eax
je 0x10006534
mov eax, dword [esi]
cmp eax, edi
jg 0x1000650a
mov edx, dword [esi + 4]
add eax, edx
cmp eax, edi
jle 0x10006534
lea edx, [edi + ebp]
cmp eax, edx
jb 0x10006511
jmp 0x10006534
lea edx, [edi + ebp]
cmp eax, edx
jge 0x10006534
mov ecx, dword [esp + 0x10]
push ebx
call fcn.10006420
mov eax, dword [esi - 0x10]
push eax
call sub.MFC71.DLL_operator_delete_1
mov ecx, dword [0x1005d210]
add esp, 4
mov dword [esi - 0xc], 0
inc ebx
add esi, 0x18
cmp ebx, ecx
jl 0x100064e2
xor edx, edx
test ecx, ecx
jle 0x1000657a
mov eax, 0x1005d1fc
mov esi, dword [esp + 0x18]
cmp dword [eax + 8], esi
jne 0x10006572
cmp dword [eax], 0
je 0x10006572
mov ecx, dword [eax + 0xc]
cmp ecx, edi
jg 0x1000656c
mov esi, dword [eax + 0x10]
add esi, ecx
lea ecx, [edi + ebp]
cmp esi, ecx
jae 0x100066bc
mov ecx, dword [0x1005d210]
inc edx
add eax, 0x18
cmp edx, ecx
jl 0x10006547
xor esi, esi
or edx, 0xffffffff
xor ebx, ebx
test ecx, ecx
jle 0x100065b4
mov ecx, 0x1005d200
lea ebx, [ebx]
mov eax, dword [ecx - 4]
test eax, eax
je 0x100065ae
mov eax, dword [ecx]
cmp eax, edx
jae 0x100065a1
mov esi, ebx
mov edx, eax
mov eax, dword [0x1005d210]
inc ebx
add ecx, 0x18
cmp ebx, eax
jl 0x10006590
mov ecx, dword [0x1005d210]
cmp ebx, ecx
jne 0x10006634
mov ebx, esi
lea esi, [esi + esi*2]
shl esi, 3
cmp dword [esi + 0x1005d1fc], 2
jne 0x10006611
mov eax, dword [esi + 0x1005d208]
mov ecx, dword [esi + 0x1005d204]
push 0
push eax
push ecx
call dword [sym.imp.MSVCR71.dll__lseek]
mov edx, dword [esi + 0x1005d20c]
mov eax, dword [esi + 0x1005d1f8]
mov ecx, dword [esi + 0x1005d204]
push edx
push eax
push ecx
call dword [sym.imp.MSVCR71.dll__write]
mov edx, dword [esi + 0x1005d204]
push edx
call dword [sym.imp.MSVCR71.dll__dup]
push eax
call dword [sym.imp.MSVCR71.dll__close]
add esp, 0x20
mov eax, dword [esi + 0x1005d1f8]
push eax
mov dword [esi + 0x1005d1fc], 1
call sub.MFC71.DLL_operator_delete_1
add esp, 4
mov dword [esi + 0x1005d1fc], 0
mov ecx, dword [esp + 0x18]
push 0
push edi
push ecx
call dword [sym.imp.MSVCR71.dll__lseek]
mov esi, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push ebp
push esi
push edx
call dword [sym.imp.MSVCR71.dll__read]
add esp, 0x18
cmp eax, ebp
jne 0x100066b4
push ebp
call sub.MFC71.DLL_operator_new_1
mov edx, dword [0x1005d1f4]
lea ecx, [ebx + ebx*2]
shl ecx, 3
mov dword [ecx + 0x1005d200], edx
add esp, 4
inc edx
mov dword [ecx + 0x1005d208], edi
mov dword [ecx + 0x1005d1f8], eax
mov dword [ecx + 0x1005d1fc], 1
mov dword [ecx + 0x1005d20c], ebp
mov dword [0x1005d1f4], edx
mov edx, dword [esp + 0x18]
mov dword [ecx + 0x1005d204], edx
mov ecx, ebp
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop ebp
pop ebx
pop esi
pop ecx
ret 0x10
lea eax, [edx + edx*2]
shl eax, 3
mov ebx, dword [eax + 0x1005d208]
mov esi, dword [eax + 0x1005d1f8]
sub esi, ebx
add esi, edi
mov edi, dword [esp + 0x1c]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x1005d1f4]
pop edi
mov dword [eax + 0x1005d200], ecx
mov eax, ebp
pop ebp
inc ecx
pop ebx
mov dword [0x1005d1f4], ecx
pop esi
pop ecx
ret 0x10