Function at 0x401e40
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x20], 0
mov eax, dword [ebp]
mov esi, dword [ebp + 0x61c]
push eax
mov dword [esp + 0x1c], esi
call dword [sym.imp.MSVCRT.dll_ftell]
mov dword [esp + 0x28], eax
mov eax, dword [ebp]
add esp, 4
test byte [eax + 0xc], 0x10
jne 0x402123
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
add esi, 4
mov dword [esp + 0x1c], esi
mov ecx, dword [esp + 0x20]
test ecx, ecx
jne 0x402123
mov edi, 1
push eax
push edi
lea ecx, [esp + 0x1c]
push edi
push ecx
call ebx
mov eax, dword [esp + 0x24]
add esp, 0x10
and eax, 0xff
cmp eax, 0x3b
ja case.0x401ef5.3
xor edx, edx
mov dl, byte [eax + 0x4021cc]
jmp dword [edx*4 + 0x4021b8]
mov eax, dword [ebp]
lea ecx, [esp + 0x14]
push eax
push edi
push edi
push ecx
call ebx
mov edx, dword [esp + 0x24]
add esp, 0x10
and edx, 0xff
lea eax, [edx - 1]
cmp eax, 0xfe
ja case.0x401ef5.3
xor ecx, ecx
mov cl, byte [eax + 0x402214]
jmp dword [ecx*4 + 0x402208]
mov eax, dword [ebp]
test byte [eax + 0xc], 0x10
jne case.0x401ebe.0
push eax
push edi
lea edx, [esp + 0x1c]
push edi
push edx
call ebx
mov eax, dword [esp + 0x24]
add esp, 0x10
test al, al
je case.0x401ebe.0
cmp al, 4
jne 0x401fb0
mov eax, dword [ebp]
lea ecx, [esp + 0x14]
push eax
push edi
push edi
push ecx
mov dword [ebp + 0x680], edi
call ebx
mov al, byte [esp + 0x24]
add esp, 0x10
mov dl, al
shr edx, 2
and edx, 7
test al, 2
mov dword [ebp + 0x684], edx
je 0x401f5e
mov dword [ebp + 0x688], edi
jmp 0x401f68
mov dword [ebp + 0x688], 0
test al, 1
je 0x401f74
mov dword [ebp + 0x68c], edi
jmp 0x401f7e
mov dword [ebp + 0x68c], 0
mov eax, dword [ebp]
lea ecx, [ebp + 0x690]
push eax
push 2
push edi
push ecx
call ebx
mov edx, dword [ebp]
lea eax, [esp + 0x24]
push edx
push edi
push edi
push eax
call ebx
mov ecx, dword [esp + 0x34]
add esp, 0x20
and ecx, 0xff
mov dword [ebp + 0x694], ecx
jmp 0x401fc4
mov edx, dword [ebp]
and eax, 0xff
push edi
push eax
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov eax, dword [ebp]
test byte [eax + 0xc], 0x10
je 0x401f09
jmp case.0x401ebe.0
mov eax, dword [ebp]
test byte [eax + 0xc], 0x10
jne case.0x401ebe.0
push eax
push edi
lea eax, [esp + 0x1c]
push edi
push eax
call ebx
mov eax, dword [esp + 0x24]
add esp, 0x10
test al, al
je case.0x401ebe.0
mov ecx, dword [ebp]
and eax, 0xff
push edi
push eax
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [ebp]
add esp, 0xc
test byte [eax + 0xc], 0x10
je 0x401fe3
jmp case.0x401ebe.0
mov edx, dword [ebp]
mov eax, dword [esp + 0x18]
push edx
push 2
push edi
push eax
call ebx
mov ecx, dword [ebp]
lea edx, [esi - 2]
push ecx
push 2
push edi
push edx
call ebx
mov eax, dword [ebp]
push eax
push 2
push edi
push esi
call ebx
mov ecx, dword [ebp]
lea edx, [esi + 2]
push ecx
push 2
push edi
push edx
call ebx
mov eax, dword [ebp]
add esp, 0x40
lea ecx, [esp + 0x13]
push eax
push edi
push edi
push ecx
call ebx
mov cl, byte [esp + 0x23]
add esp, 0x10
test cl, 0x80
je 0x40206f
mov dword [esi + 4], edi
test cl, 0x40
je 0x402077
mov dword [esi + 8], edi
test cl, 0x20
je 0x40207f
mov dword [esi + 0xc], edi
mov eax, dword [esi + 4]
and ecx, 7
inc ecx
mov edx, edi
shl edx, cl
test eax, eax
mov dword [esi + 0x10], edx
je 0x4020bf
mov eax, edx
lea eax, [eax + eax*2]
push eax
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esi + 0x14], eax
test eax, eax
je case.0x401ef5.3
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp]
push ecx
lea edx, [eax + eax*2]
mov eax, dword [esi + 0x14]
push edx
push edi
push eax
call ebx
add esp, 0x10
mov ecx, dword [ebp]
test byte [ecx + 0xc], 0x10
jne case.0x401ef5.3
mov edx, dword [esp + 0x18]
mov ecx, ebp
push edx
call fcn.00403240
test eax, eax
je case.0x401ef5.3
mov ecx, dword [ebp + 0x680]
lea eax, [ebp + 0x680]
test ecx, ecx
je 0x4020fe
lea edi, [esi + 0x1c]
mov ecx, 6
mov esi, eax
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x1c]
mov dword [eax], 0
mov ecx, dword [esp + 0x18]
add ecx, 0x38
add esi, 0x38
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], esi
jmp case.0x401ebe.0
mov dword [esp + 0x20], edi
mov eax, dword [ebp]
test byte [eax + 0xc], 0x10
je 0x401e86
mov ecx, dword [esp + 0x24]
mov edx, dword [ebp]
push 0
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov ecx, dword [ebp + 0x624]
mov eax, dword [ebp + 0x61c]
xor ebx, ebx
test ecx, ecx
jle 0x402193
lea esi, [eax + 0x1c]
mov eax, dword [esi - 4]
test eax, eax
je 0x402170
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi - 4], 0
mov eax, dword [esi]
test eax, eax
je 0x402185
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi], 0
mov eax, dword [ebp + 0x624]
add esi, 0x38
inc ebx
cmp ebx, eax
jl 0x402159
mov eax, dword [ebp + 0x61c]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [ebp + 0x61c], 0
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret