Function at 0x4027e0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
mov esi, ecx
push edi
xor edi, edi
cmp dword [esi + 0x18], edi
je 0x40282b
mov ecx, dword [esi + 0x620]
mov edx, dword [esi + 0x61c]
lea eax, [ecx*8]
sub eax, ecx
inc ecx
mov dword [esi + 0x620], ecx
lea eax, [edx + eax*8]
mov edx, dword [esi + 0x624]
cmp ecx, edx
jb 0x402b31
mov dword [esi + 0x620], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov eax, dword [esi + 0x660]
cmp eax, edi
je 0x402844
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi + 0x660], edi
mov eax, dword [esi + 0x664]
cmp eax, edi
je 0x40285d
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi + 0x664], edi
mov ebp, dword [sym.imp.MSVCRT.dll_fseek]
lea edi, [esi + 0x648]
mov ecx, 0xe
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.MSVCRT.dll_fread]
mov ebx, 1
mov eax, dword [esi]
lea ecx, [esp + 0x14]
push eax
push ebx
push ebx
push ecx
call edi
mov eax, dword [esp + 0x24]
add esp, 0x10
and eax, 0xff
cmp eax, 0x3b
ja case.0x4028dc.3
xor edx, edx
mov dl, byte [eax + 0x402b50]
jmp dword [edx*4 + 0x402b3c]
mov eax, dword [esi]
lea ecx, [esp + 0x14]
push eax
push ebx
push ebx
push ecx
call edi
mov edx, dword [esp + 0x24]
add esp, 0x10
and edx, 0xff
lea eax, [edx - 1]
cmp eax, 0xfe
ja case.0x4028dc.3
xor ecx, ecx
mov cl, byte [eax + 0x402b98]
jmp dword [ecx*4 + 0x402b8c]
mov eax, dword [esi]
test byte [eax + 0xc], 0x10
jne case.0x4028a6.0
push eax
push ebx
lea edx, [esp + 0x1c]
push ebx
push edx
call edi
mov eax, dword [esp + 0x24]
add esp, 0x10
test al, al
je case.0x4028a6.0
cmp al, 4
jne 0x40298f
mov eax, dword [esi]
lea ecx, [esp + 0x14]
push eax
push ebx
push ebx
push ecx
mov dword [esi + 0x680], ebx
call edi
mov al, byte [esp + 0x24]
add esp, 0x10
mov dl, al
shr edx, 2
and edx, 7
test al, 2
mov dword [esi + 0x684], edx
je 0x40293f
mov dword [esi + 0x688], ebx
jmp 0x402949
mov dword [esi + 0x688], 0
test bl, al
je 0x402955
mov dword [esi + 0x68c], ebx
jmp 0x40295f
mov dword [esi + 0x68c], 0
mov eax, dword [esi]
lea ecx, [esi + 0x690]
push eax
push 2
push ebx
push ecx
call edi
mov edx, dword [esi]
lea eax, [esp + 0x24]
push edx
push ebx
push ebx
push eax
call edi
mov ecx, dword [esp + 0x34]
add esp, 0x20
and ecx, 0xff
mov dword [esi + 0x694], ecx
jmp 0x40299e
mov edx, dword [esi]
and eax, 0xff
push ebx
push eax
push edx
call ebp
add esp, 0xc
mov eax, dword [esi]
test byte [eax + 0xc], 0x10
je 0x4028eb
jmp case.0x4028a6.0
mov eax, dword [esi]
test byte [eax + 0xc], 0x10
jne case.0x4028a6.0
push eax
push ebx
lea eax, [esp + 0x1c]
push ebx
push eax
call edi
mov eax, dword [esp + 0x24]
add esp, 0x10
test al, al
je case.0x4028a6.0
mov ecx, dword [esi]
and eax, 0xff
push ebx
push eax
push ecx
call ebp
mov eax, dword [esi]
add esp, 0xc
test byte [eax + 0xc], 0x10
je 0x4029bb
jmp case.0x4028a6.0
mov edx, dword [esi + 8]
mov eax, dword [esi]
push 0
push edx
push eax
call ebp
add esp, 0xc
jmp case.0x4028a6.0
mov ecx, dword [esi]
lea ebp, [esi + 0x648]
push ecx
push 2
push ebx
push ebp
call edi
mov edx, dword [esi]
lea eax, [esi + 0x64a]
push edx
push 2
push ebx
push eax
call edi
mov ecx, dword [esi]
lea edx, [esi + 0x64c]
push ecx
push 2
push ebx
push edx
call edi
mov eax, dword [esi]
lea ecx, [esi + 0x64e]
push eax
push 2
push ebx
push ecx
call edi
mov edx, dword [esi]
add esp, 0x40
lea eax, [esp + 0x13]
push edx
push ebx
push ebx
push eax
call edi
mov cl, byte [esp + 0x23]
add esp, 0x10
test cl, 0x80
je 0x402a60
mov dword [esi + 0x650], ebx
test cl, 0x40
je 0x402a6b
mov dword [esi + 0x654], ebx
test cl, 0x20
je 0x402a76
mov dword [esi + 0x658], ebx
and ecx, 7
mov eax, ebx
inc ecx
shl eax, cl
mov dword [esi + 0x65c], eax
lea ecx, [eax + eax*2]
push ecx
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esi + 0x660], eax
test eax, eax
je case.0x4028dc.3
mov ecx, dword [esi + 0x650]
test ecx, ecx
je 0x402ab8
mov ecx, dword [esi + 0x65c]
mov edx, dword [esi]
push edx
lea ecx, [ecx + ecx*2]
push ecx
push ebx
push eax
call edi
add esp, 0x10
mov edx, dword [esi]
test byte [edx + 0xc], 0x10
jne case.0x4028dc.3
push ebp
mov ecx, esi
call fcn.00403240
test eax, eax
je case.0x4028dc.3
lea eax, [esi + 0x680]
lea edi, [esi + 0x668]
mov ecx, 6
mov esi, eax
rep movsd dword es:[edi], dword [esi]
cmp dword [eax], ebx
jne 0x402aeb
mov dword [eax], 0
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 8
ret
mov eax, dword [esi + 0x660]
test eax, eax
je 0x402b12
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi + 0x660], 0
mov eax, dword [esi + 0x664]
test eax, eax
je 0x402b2f
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi + 0x664], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret