Function at 0x408260
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x28
push ebx
mov ebx, dword [esp + 0x30]
push ebp
push esi
push edi
push 0
push eax
push ebx
call dword [sym.imp.MSVCRT.DLL_fseek]
mov esi, dword [sym.imp.MSVCRT.DLL_fread]
push ebx
push 1
lea ecx, [esp + 0x44]
push 8
push ecx
call esi
add esp, 0x1c
test eax, eax
je 0x408901
mov ebp, dword [esp + 0x48]
mov edx, dword [esp + 0x30]
lea eax, [edx - 2]
cmp eax, 3
ja case.default.0x4082aa
jmp dword [eax*4 + 0x408928]
mov eax, dword [ebp + 4]
mov ecx, dword [ebp]
push eax
push 0x45
push ecx
call fcn.00408230
mov edx, dword [esp + 0x40]
mov dword [ebp], eax
mov eax, dword [ebp + 4]
push edx
inc eax
mov dword [ebp + 4], eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edi, eax
mov eax, dword [esp + 0x44]
push ebx
push 1
push eax
push edi
mov dword [esp + 0x68], edi
call esi
or ecx, 0xffffffff
xor eax, eax
add esp, 0x20
mov edx, dword [esp + 0x48]
repne scasb al, byte es:[edi]
not ecx
mov dword [esp + 0x28], ecx
lea edi, [ecx + edx]
or ecx, 0xffffffff
mov dword [esp + 0x18], edi
repne scasb al, byte es:[edi]
mov eax, dword [ebp + 0xc]
not ecx
dec ecx
mov edi, ecx
inc edi
test eax, eax
mov dword [esp + 0x24], edi
je 0x4083c4
mov dword [esp + 0x14], 0
jbe 0x4083c4
mov ecx, dword [ebp + 8]
add ecx, 8
mov dword [esp + 0x10], ecx
mov eax, dword [ecx - 4]
mov edi, dword [esp + 0x48]
mov dl, byte [edi]
mov cl, dl
cmp dl, byte [eax]
jne 0x40835d
test cl, cl
je 0x408359
mov dl, byte [edi + 1]
mov cl, dl
cmp dl, byte [eax + 1]
jne 0x40835d
add edi, 2
add eax, 2
test cl, cl
jne 0x408339
xor eax, eax
jmp 0x408362
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4083a1
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
mov eax, dword [eax]
mov dl, byte [edi]
mov cl, dl
cmp dl, byte [eax]
jne 0x408394
test cl, cl
je 0x408390
mov dl, byte [edi + 1]
mov cl, dl
cmp dl, byte [eax + 1]
jne 0x408394
add edi, 2
add eax, 2
test cl, cl
jne 0x408370
xor eax, eax
jmp 0x408399
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x408496
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp + 0xc]
inc edx
add ecx, 0x12
cmp edx, eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
jb 0x408332
mov edi, dword [esp + 0x24]
mov ecx, dword [ebp + 8]
push eax
push 0x12
push ecx
call fcn.00408230
mov edx, dword [esp + 0x34]
mov dword [ebp + 8], eax
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push edi
lea ecx, [ecx + ecx*8]
mov dword [edx + ecx*2 + 4], eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov edi, dword [esp + 0x5c]
lea ecx, [ecx + ecx*8]
mov dword [edx + ecx*2 + 8], eax
mov eax, dword [ebp + 0xc]
or ecx, 0xffffffff
lea edx, [eax + eax*8]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x3c], edx
mov edx, dword [ebp + 8]
mov esi, edi
mov edi, dword [esp + 0x3c]
mov eax, ecx
shr ecx, 2
mov edi, dword [edx + edi*2 + 4]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0xc]
mov edi, dword [esp + 0x2c]
or ecx, 0xffffffff
lea edx, [eax + eax*8]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x3c], edx
mov edx, dword [ebp + 8]
mov esi, edi
mov edi, dword [esp + 0x3c]
mov eax, ecx
shr ecx, 2
mov edi, dword [edx + edi*2 + 8]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x5c]
push ecx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov ecx, dword [ebp + 4]
add esp, 0x18
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
mov ecx, dword [ebp + 0xc]
lea edx, [eax + eax*2]
mov eax, dword [ebp]
mov dword [edx + eax - 0x31], ecx
mov eax, dword [ebp + 0xc]
inc eax
mov dword [ebp + 0xc], eax
jmp 0x4088cd
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x14]
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
mov ecx, dword [ebp]
lea eax, [eax + eax*2]
mov dword [eax + ecx - 0x31], edx
mov eax, dword [esp + 0x48]
push eax
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x4088d3
push ebx
push 1
lea edx, [esp + 0x34]
push 4
push edx
call esi
push ebx
push 1
lea eax, [esp + 0x58]
push 4
push eax
call esi
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
lea ecx, [eax + eax*2]
mov eax, dword [esp + 0x60]
mov dword [ecx + edx - 0x45], eax
mov eax, dword [esp + 0x60]
lea ecx, [eax + eax*4]
shl ecx, 2
push ecx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edx, dword [ebp + 4]
lea ecx, [edx + edx*2]
shl ecx, 3
sub ecx, edx
lea edx, [ecx + ecx*2]
mov ecx, dword [ebp]
mov dword [edx + ecx - 0x41], eax
mov eax, dword [esp + 0x64]
lea edx, [eax + eax*2]
shl edx, 2
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edx, dword [ebp + 4]
lea ecx, [edx + edx*2]
shl ecx, 3
sub ecx, edx
mov edx, dword [ebp]
lea ecx, [ecx + ecx*2]
mov dword [ecx + edx - 0x3d], eax
mov eax, dword [esp + 0x68]
shl eax, 5
push eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x6c]
push ebx
mov edi, eax
push ecx
push 0x20
push edi
mov dword [esp + 0x64], edi
call esi
mov eax, dword [esp + 0x7c]
xor edx, edx
add esp, 0x3c
cmp eax, edx
mov dword [esp + 0x48], edx
jbe 0x4085f5
lea ecx, [edi + 0x1c]
mov esi, dword [ebp + 4]
lea edi, [ecx - 0x1c]
add ecx, 0x20
lea eax, [esi + esi*2]
shl eax, 3
sub eax, esi
mov esi, dword [ebp]
lea eax, [eax + eax*2]
mov eax, dword [eax + esi - 0x41]
mov esi, dword [edi]
add eax, edx
add edx, 0x14
mov dword [eax], esi
mov esi, dword [edi + 4]
mov dword [eax + 4], esi
mov esi, dword [edi + 8]
mov dword [eax + 8], esi
mov esi, dword [ebp + 4]
lea eax, [esi + esi*2]
shl eax, 3
sub eax, esi
mov esi, dword [ebp]
lea eax, [eax + eax*2]
mov eax, dword [eax + esi - 0x41]
mov esi, dword [ecx - 0x24]
mov dword [eax + edx - 8], esi
mov esi, dword [ebp + 4]
lea eax, [esi + esi*2]
shl eax, 3
sub eax, esi
mov esi, dword [ebp]
lea eax, [eax + eax*2]
mov eax, dword [eax + esi - 0x41]
mov esi, dword [ecx - 0x20]
mov dword [eax + edx - 4], esi
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x40]
inc eax
cmp eax, esi
mov dword [esp + 0x48], eax
jb 0x408572
mov edi, dword [esp + 0x28]
mov esi, dword [sym.imp.MSVCRT.DLL_fread]
push edi
jmp 0x4087d3
push ebx
push 1
lea ecx, [esp + 0x24]
push 1
push ecx
call esi
mov eax, dword [esp + 0x2c]
and eax, 0xff
lea ecx, [eax + eax*2]
lea edx, [ecx + ecx*4]
lea eax, [eax + edx*4]
push eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x30]
push ebx
and ecx, 0xff
mov edi, eax
push 0x3d
push ecx
push edi
call esi
push edi
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
push ebx
push 1
lea edx, [esp + 0x6c]
push 4
push edx
call esi
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x74]
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
mov ecx, dword [ebp]
lea eax, [eax + eax*2]
mov dword [eax + ecx - 0x45], edx
mov eax, dword [esp + 0x74]
lea eax, [eax + eax*4]
shl eax, 2
push eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edx, dword [ebp + 4]
lea ecx, [edx + edx*2]
shl ecx, 3
sub ecx, edx
mov edx, dword [ebp]
lea ecx, [ecx + ecx*2]
mov dword [ecx + edx - 0x41], eax
mov eax, dword [esp + 0x78]
lea eax, [eax + eax*2]
shl eax, 2
push eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edx, dword [ebp + 4]
add esp, 0x40
lea ecx, [edx + edx*2]
shl ecx, 3
sub ecx, edx
mov edx, dword [ebp]
lea ecx, [ecx + ecx*2]
mov dword [ecx + edx - 0x3d], eax
mov eax, dword [esp + 0x3c]
shl eax, 5
push eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x40]
push ebx
push ecx
push 0x20
push eax
mov dword [esp + 0x5c], eax
call esi
mov eax, dword [esp + 0x50]
add esp, 0x14
xor edi, edi
test eax, eax
jbe 0x4087ce
mov edx, dword [esp + 0x48]
xor ecx, ecx
lea eax, [edx + 4]
movsx edx, word [eax - 4]
mov esi, dword [ebp + 4]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
lea edx, [esi + esi*2]
add eax, 0x20
shl edx, 3
fmul dword [0x4c9e78]
sub edx, esi
mov esi, dword [ebp]
add ecx, 0x14
lea edx, [edx + edx*2]
mov edx, dword [edx + esi - 0x41]
fstp dword [edx + ecx - 0x14]
movsx edx, word [eax - 0x22]
mov esi, dword [ebp + 4]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
lea edx, [esi + esi*2]
shl edx, 3
fmul dword [0x4c9e78]
sub edx, esi
mov esi, dword [ebp]
lea edx, [edx + edx*2]
mov edx, dword [edx + esi - 0x41]
fstp dword [edx + ecx - 0x10]
movsx edx, word [eax - 0x20]
mov esi, dword [ebp + 4]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
lea edx, [esi + esi*2]
shl edx, 3
fmul dword [0x4c9e78]
sub edx, esi
mov esi, dword [ebp]
lea edx, [edx + edx*2]
mov edx, dword [edx + esi - 0x41]
fstp dword [edx + ecx - 0xc]
movsx edx, word [eax - 8]
mov esi, dword [ebp + 4]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
lea edx, [esi + esi*2]
shl edx, 3
fmul dword [0x4c9e74]
sub edx, esi
mov esi, dword [ebp]
lea edx, [edx + edx*2]
mov edx, dword [edx + esi - 0x41]
fstp dword [edx + ecx - 8]
movsx edx, word [eax - 6]
mov esi, dword [ebp + 4]
mov dword [esp + 0x28], edx
fild dword [esp + 0x28]
lea edx, [esi + esi*2]
shl edx, 3
fmul dword [0x4c9e74]
sub edx, esi
mov esi, dword [ebp]
inc edi
lea edx, [edx + edx*2]
mov edx, dword [edx + esi - 0x41]
fstp dword [edx + ecx - 4]
cmp edi, dword [esp + 0x3c]
jb 0x4086e0
mov esi, dword [sym.imp.MSVCRT.DLL_fread]
mov eax, dword [esp + 0x48]
push eax
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov ecx, dword [ebp + 4]
xor edx, edx
add esp, 4
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
lea ecx, [eax + eax*2]
mov eax, dword [ebp]
mov dword [ecx + eax - 5], edx
mov ecx, dword [ebp + 4]
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
lea ecx, [eax + eax*2]
mov eax, dword [ebp]
mov dword [ecx + eax - 9], edx
mov ecx, dword [ebp + 4]
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
lea ecx, [eax + eax*2]
mov eax, dword [ebp]
mov dword [ecx + eax - 0xd], edx
mov ecx, dword [ebp + 4]
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
lea ecx, [eax + eax*2]
mov eax, dword [ebp]
mov dword [ecx + eax - 0x11], edx
jmp 0x4088d3
push ebx
push 1
lea ecx, [esp + 0x28]
push 4
push ecx
call esi
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x44]
lea eax, [ecx + ecx*2]
lea esi, [edx - 4]
shl eax, 3
shr esi, 1
sub eax, ecx
mov ecx, dword [ebp]
lea edx, [esi + esi]
lea eax, [eax + eax*2]
push edx
mov dword [eax + ecx - 0x39], esi
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edx, dword [ebp + 4]
push ebx
push esi
push 2
lea ecx, [edx + edx*2]
shl ecx, 3
sub ecx, edx
mov edx, dword [ebp]
lea ecx, [ecx + ecx*2]
mov dword [ecx + edx - 0x35], eax
mov ecx, dword [ebp + 4]
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
mov ecx, dword [ebp]
lea eax, [eax + eax*2]
mov edx, dword [eax + ecx - 0x35]
push edx
call dword [sym.imp.MSVCRT.DLL_fread]
mov eax, dword [esp + 0x44]
add esp, 0x24
test eax, 0xffff0000
je 0x4088cd
mov ecx, dword [ebp + 4]
and eax, 0xffff
lea edx, [eax + eax*2]
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
mov ecx, dword [ebp]
mov dword [esp + 0x20], edx
lea eax, [eax + eax*2]
mov dword [eax + ecx - 0x39], edx
mov esi, dword [sym.imp.MSVCRT.DLL_fread]
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x44]
mov edx, 0xfffffff8
sub edx, ecx
add eax, edx
mov dword [esp + 0x44], eax
je 0x408901
push ebx
push 1
lea eax, [esp + 0x38]
push 8
push eax
call esi
add esp, 0x10
test eax, eax
jne 0x40829a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push ebx
call dword [sym.imp.MSVCRT.DLL_ftell]
mov ecx, dword [esp + 0x38]
push 0
add eax, ecx
push eax
push ebx
call dword [sym.imp.MSVCRT.DLL_fseek]
add esp, 0x10
jmp 0x4088d3