Function at 0x405620
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 edi, dword [sym.imp.MSVCRT.DLL_fread]
push ebx
push 1
lea ecx, [esp + 0x44]
push 8
push ecx
call edi
add esp, 0x1c
test eax, eax
je 0x405c18
mov ebp, dword [esp + 0x48]
mov edx, dword [esp + 0x30]
lea eax, [edx - 2]
cmp eax, 3
ja case.default.0x40566a
jmp dword [eax*4 + 0x405cd0]
mov eax, dword [ebp + 4]
mov ecx, dword [ebp]
push eax
push 0x44
push ecx
call fcn.004055f0
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 esi, eax
mov eax, dword [esp + 0x44]
push ebx
push 1
push eax
push esi
mov dword [esp + 0x68], esi
call edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
add esp, 0x20
repne scasb al, byte es:[edi]
not ecx
mov dword [esp + 0x28], ecx
add ecx, esi
mov dword [esp + 0x18], ecx
mov edi, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ecx
mov ecx, dword [ebp + 0xc]
inc edi
test ecx, ecx
mov dword [esp + 0x24], edi
je 0x405780
mov dword [esp + 0x14], eax
jbe 0x405780
mov eax, dword [ebp + 8]
add eax, 8
mov dword [esp + 0x10], eax
mov esi, dword [eax - 4]
mov edi, dword [esp + 0x48]
mov dl, byte [edi]
mov al, dl
cmp dl, byte [esi]
jne 0x405718
test al, al
je 0x405714
mov dl, byte [edi + 1]
mov al, dl
cmp dl, byte [esi + 1]
jne 0x405718
add edi, 2
add esi, 2
test al, al
jne 0x4056f4
xor eax, eax
jmp 0x40571d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40575c
mov eax, dword [esp + 0x10]
mov edi, dword [esp + 0x18]
mov esi, dword [eax]
mov dl, byte [edi]
mov al, dl
cmp dl, byte [esi]
jne 0x40574f
test al, al
je 0x40574b
mov dl, byte [edi + 1]
mov al, dl
cmp dl, byte [esi + 1]
jne 0x40574f
add edi, 2
add esi, 2
test al, al
jne 0x40572b
xor eax, eax
jmp 0x405754
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x40584c
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
inc edx
add eax, 0x12
cmp edx, ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
jb 0x4056ed
mov esi, dword [esp + 0x48]
mov edi, dword [esp + 0x24]
mov edx, dword [ebp + 8]
push ecx
push 0x12
push edx
call fcn.004055f0
mov dword [ebp + 8], eax
mov eax, dword [esp + 0x34]
push eax
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, esi
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 eax, dword [ebp + 4]
mov ecx, dword [ebp + 0xc]
mov edx, eax
add esp, 0x18
shl edx, 4
add edx, eax
mov eax, dword [ebp]
mov dword [eax + edx*4 - 0x30], ecx
mov eax, dword [ebp + 0xc]
inc eax
mov dword [ebp + 0xc], eax
jmp 0x405be4
mov eax, dword [ebp + 4]
mov edx, dword [ebp]
mov ecx, eax
shl ecx, 4
add ecx, eax
mov eax, dword [esp + 0x14]
mov dword [edx + ecx*4 - 0x30], eax
mov ecx, dword [esp + 0x48]
push ecx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
add esp, 4
jmp 0x405be4
push ebx
push 1
lea edx, [esp + 0x34]
push 4
push edx
call edi
push ebx
push 1
lea eax, [esp + 0x58]
push 4
push eax
call edi
mov eax, dword [ebp + 4]
mov edx, dword [ebp]
mov ecx, eax
shl ecx, 4
add ecx, eax
mov eax, dword [esp + 0x60]
mov dword [edx + ecx*4 - 0x44], 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 ecx, dword [ebp + 4]
mov edx, ecx
shl edx, 4
add edx, ecx
mov ecx, dword [ebp]
mov dword [ecx + edx*4 - 0x40], 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 ecx, dword [ebp + 4]
mov edx, ecx
shl edx, 4
add edx, ecx
mov ecx, dword [ebp]
mov dword [ecx + edx*4 - 0x3c], eax
mov edx, dword [esp + 0x68]
shl edx, 5
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov esi, eax
mov eax, dword [esp + 0x6c]
push ebx
push eax
push 0x20
push esi
mov dword [esp + 0x64], esi
call edi
mov eax, dword [esp + 0x7c]
xor ecx, ecx
add esp, 0x3c
cmp eax, ecx
mov dword [esp + 0x48], ecx
jbe 0x40598b
lea eax, [esi + 0x1c]
mov edx, dword [ebp + 4]
lea esi, [eax - 0x1c]
mov edi, edx
add eax, 0x20
shl edi, 4
add edi, edx
mov edx, dword [ebp]
mov edx, dword [edx + edi*4 - 0x40]
mov edi, dword [esi]
add edx, ecx
add ecx, 0x14
mov dword [edx], edi
mov edi, dword [esi + 4]
mov dword [edx + 4], edi
mov esi, dword [esi + 8]
mov dword [edx + 8], esi
mov edx, dword [ebp + 4]
mov esi, edx
shl esi, 4
add esi, edx
mov edx, dword [ebp]
mov edx, dword [edx + esi*4 - 0x40]
mov esi, dword [eax - 0x24]
mov dword [edx + ecx - 8], esi
mov edx, dword [ebp + 4]
mov esi, edx
shl esi, 4
add esi, edx
mov edx, dword [ebp]
mov edx, dword [edx + esi*4 - 0x40]
mov esi, dword [eax - 0x20]
mov dword [edx + ecx - 4], esi
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x40]
inc edx
cmp edx, esi
mov dword [esp + 0x48], edx
jb 0x405914
mov esi, dword [esp + 0x28]
mov edi, dword [sym.imp.MSVCRT.DLL_fread]
push esi
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov eax, dword [ebp + 4]
mov edx, dword [ebp]
mov ecx, eax
add esp, 4
shl ecx, 4
add ecx, eax
xor eax, eax
mov dword [edx + ecx*4 - 4], eax
mov ecx, dword [ebp + 4]
mov edx, ecx
shl edx, 4
add edx, ecx
mov ecx, dword [ebp]
mov dword [ecx + edx*4 - 8], eax
mov ecx, dword [ebp + 4]
mov edx, ecx
shl edx, 4
add edx, ecx
mov ecx, dword [ebp]
mov dword [ecx + edx*4 - 0xc], eax
mov ecx, dword [ebp + 4]
mov edx, ecx
shl edx, 4
add edx, ecx
mov ecx, dword [ebp]
mov dword [ecx + edx*4 - 0x10], eax
jmp 0x405bea
push ebx
push 1
lea edx, [esp + 0x24]
push 1
push edx
call edi
mov eax, dword [esp + 0x2c]
and eax, 0xff
lea ecx, [eax + eax*2]
lea ecx, [ecx + ecx*4]
lea edx, [eax + ecx*4]
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edi, dword [sym.imp.MSVCRT.DLL_fread]
mov esi, eax
mov eax, dword [esp + 0x30]
push ebx
and eax, 0xff
push 0x3d
push eax
push esi
call edi
push esi
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
push ebx
push 1
lea ecx, [esp + 0x6c]
push 4
push ecx
call edi
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x74]
mov edx, eax
shl edx, 4
add edx, eax
mov eax, dword [ebp]
mov dword [eax + edx*4 - 0x44], ecx
mov eax, dword [esp + 0x74]
lea edx, [eax + eax*4]
shl edx, 2
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp + 4]
mov edx, ecx
shl edx, 4
add edx, ecx
mov ecx, dword [ebp]
mov dword [ecx + edx*4 - 0x40], eax
mov eax, dword [esp + 0x78]
lea edx, [eax + eax*2]
shl edx, 2
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp + 4]
add esp, 0x40
mov edx, ecx
shl edx, 4
add edx, ecx
mov ecx, dword [ebp]
mov dword [ecx + edx*4 - 0x3c], eax
mov edx, dword [esp + 0x3c]
shl edx, 5
push edx
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 edi
mov eax, dword [esp + 0x50]
xor esi, esi
add esp, 0x14
cmp eax, esi
jbe 0x405b93
mov edx, dword [esp + 0x48]
xor ecx, ecx
lea eax, [edx + 4]
movsx edx, word [eax - 4]
mov dword [esp + 0x28], edx
mov edx, dword [ebp + 4]
fild dword [esp + 0x28]
mov edi, edx
add eax, 0x20
shl edi, 4
fmul dword [0x44dcf0]
add edi, edx
mov edx, dword [ebp]
add ecx, 0x14
mov edx, dword [edx + edi*4 - 0x40]
fstp dword [edx + ecx - 0x14]
movsx edx, word [eax - 0x22]
mov dword [esp + 0x28], edx
mov edx, dword [ebp + 4]
fild dword [esp + 0x28]
mov edi, edx
shl edi, 4
fmul dword [0x44dcf0]
add edi, edx
mov edx, dword [ebp]
mov edx, dword [edx + edi*4 - 0x40]
fstp dword [edx + ecx - 0x10]
movsx edx, word [eax - 0x20]
mov dword [esp + 0x28], edx
mov edx, dword [ebp + 4]
fild dword [esp + 0x28]
mov edi, edx
shl edi, 4
fmul dword [0x44dcf0]
add edi, edx
mov edx, dword [ebp]
mov edx, dword [edx + edi*4 - 0x40]
fstp dword [edx + ecx - 0xc]
movsx edx, word [eax - 8]
mov dword [esp + 0x28], edx
mov edx, dword [ebp + 4]
fild dword [esp + 0x28]
mov edi, edx
shl edi, 4
fmul dword [0x44dcec]
add edi, edx
mov edx, dword [ebp]
mov edx, dword [edx + edi*4 - 0x40]
fstp dword [edx + ecx - 8]
movsx edx, word [eax - 6]
mov dword [esp + 0x28], edx
mov edx, dword [ebp + 4]
fild dword [esp + 0x28]
mov edi, edx
shl edi, 4
fmul dword [0x44dcec]
add edi, edx
mov edx, dword [ebp]
inc esi
mov edx, dword [edx + edi*4 - 0x40]
fstp dword [edx + ecx - 4]
cmp esi, dword [esp + 0x3c]
jb 0x405abd
xor esi, esi
mov eax, dword [esp + 0x48]
push eax
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov eax, dword [ebp + 4]
mov edx, dword [ebp]
mov ecx, eax
add esp, 4
shl ecx, 4
add ecx, eax
mov dword [edx + ecx*4 - 4], esi
mov eax, dword [ebp + 4]
mov edx, dword [ebp]
mov ecx, eax
shl ecx, 4
add ecx, eax
mov dword [edx + ecx*4 - 8], esi
mov eax, dword [ebp + 4]
mov edx, dword [ebp]
mov ecx, eax
shl ecx, 4
add ecx, eax
mov dword [edx + ecx*4 - 0xc], esi
mov eax, dword [ebp + 4]
mov edx, dword [ebp]
mov ecx, eax
shl ecx, 4
add ecx, eax
mov dword [edx + ecx*4 - 0x10], esi
mov edi, dword [sym.imp.MSVCRT.DLL_fread]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x44]
mov ecx, 0xfffffff8
sub ecx, edx
add eax, ecx
mov dword [esp + 0x44], eax
je 0x405c18
push ebx
push 1
lea edx, [esp + 0x38]
push 8
push edx
call edi
add esp, 0x10
test eax, eax
jne 0x40565a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
push ebx
push 1
lea eax, [esp + 0x28]
push 4
push eax
call edi
mov ecx, dword [esp + 0x44]
mov eax, dword [ebp + 4]
mov edx, eax
lea esi, [ecx - 4]
shr esi, 1
shl edx, 4
add edx, eax
mov eax, dword [ebp]
lea ecx, [esi + esi]
push ecx
mov dword [eax + edx*4 - 0x38], esi
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp + 4]
push ebx
mov edx, ecx
push esi
shl edx, 4
add edx, ecx
mov ecx, dword [ebp]
push 2
mov dword [ecx + edx*4 - 0x34], eax
mov eax, dword [ebp + 4]
mov edx, eax
shl edx, 4
add edx, eax
mov eax, dword [ebp]
mov ecx, dword [eax + edx*4 - 0x34]
push ecx
call dword [sym.imp.MSVCRT.DLL_fread]
mov eax, dword [esp + 0x44]
add esp, 0x24
test eax, 0xffff0000
je 0x405be4
and eax, 0xffff
lea ecx, [eax + eax*2]
mov eax, dword [ebp + 4]
mov edx, eax
mov dword [esp + 0x20], ecx
shl edx, 4
add edx, eax
mov eax, dword [ebp]
mov dword [eax + edx*4 - 0x38], ecx
jmp 0x405be4
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 0x405bea