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

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0xc4
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xd8]
push 0
push eax
push edi
call dword [sym.imp.MSVCRT.DLL_fseek]
mov ebp, dword [esp + 0xf0]
mov ebx, dword [sym.imp.MSVCRT.DLL_fread]
add esp, 0xc
xor esi, esi
jmp 0x407642
mov ebx, dword [sym.imp.MSVCRT.DLL_fread]
mov edi, dword [esp + 0xd8]
xor esi, esi
push edi
push 1
lea ecx, [esp + 0x3c]
push 8
push ecx
call ebx
mov eax, dword [esp + 0x44]
add esp, 0x10
cmp eax, 0x1006
ja 0x407b3d
je 0x407b0a
cmp eax, 0x1004
ja 0x407a83
je 0x407a5a
cmp eax, 0x905
jb case.0x407b53.4107
cmp eax, 0x907
ja case.0x407b53.4107
push edi
push 1
lea edx, [esp + 0x28]
push 4
push edx
call ebx
mov eax, dword [esp + 0x48]
add eax, 0xfffffffc
push eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x4c]
push edi
add ecx, 0xfffffffc
push 1
push ecx
push eax
mov dword [esp + 0x34], eax
call ebx
push 0x104
mov dword [esp + 0x84], esi
mov dword [ebp + 0xc], esi
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
push 0x104
mov dword [esp + 0x48], eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
push 0x104
mov dword [esp + 0x58], eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x50]
add esp, 0x30
cmp eax, esi
mov dword [esp + 0x18], esi
jbe 0x407a07
cmp dword [esp + 0x34], 0x905
je 0x4077a6
mov ebx, dword [esp + 0x10]
mov esi, dword [esp + 0x5c]
mov eax, dword [esp + 0x1c]
mov edi, dword [sym.imp.MSVCRT.DLL_sprintf]
lea edx, [esi + ebx]
push edx
push 0x4532b4
push eax
call edi
mov edx, dword [esp + 0x3c]
add esi, eax
add esp, 0xc
lea ecx, [esi + ebx]
push ecx
push 0x4532b8
push edx
call edi
lea edx, [esi + eax + 1]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
lea edi, [edx + ebx]
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x34]
not ecx
dec ecx
cmp eax, 0x907
lea esi, [edx + ecx + 1]
jne 0x407774
lea edi, [esi + ebx]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea esi, [esi + ecx + 1]
mov ecx, dword [esp + 0x28]
lea eax, [esi + ebx]
push eax
push 0x4532bc
push ecx
call dword [sym.imp.MSVCRT.DLL_sprintf]
lea esi, [esi + eax + 1]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
lea edi, [esi + ebx]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea edx, [esi + ecx + 0xd]
mov dword [esp + 0x5c], edx
jmp 0x40780b
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x5c]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [sym.imp.MSVCRT.DLL_sprintf]
lea eax, [esi + edi]
push eax
push 0x4532c0
push ecx
call ebx
add esi, eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
lea edx, [esi + edi]
push edx
push 0x4532c4
push eax
call ebx
mov edx, dword [esp + 0x34]
lea esi, [esi + eax + 0xa]
add esp, 0xc
lea ecx, [esi + edi]
push ecx
push 0x4532c8
push edx
call ebx
lea edx, [esi + eax + 1]
or ecx, 0xffffffff
add edi, edx
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [edx + ecx + 1]
mov dword [esp + 0x5c], eax
mov eax, dword [ebp + 4]
mov byte [esp + 0x2f], 0
test eax, eax
mov dword [esp + 0x24], 0
jbe 0x407932
xor edi, edi
mov dword [esp + 0x14], edi
mov ecx, dword [ebp]
mov eax, dword [esp + 0x1c]
add edi, ecx
mov esi, dword [edi + 0x18]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x40785d
test cl, cl
je 0x407859
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x40785d
add eax, 2
add esi, 2
test cl, cl
jne 0x407835
xor eax, eax
jmp 0x407862
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407907
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [edi + 0x14], eax
mov eax, dword [ebp + 0xc]
test eax, eax
jbe 0x407907
mov edi, dword [ebp + 8]
add edi, 8
mov esi, dword [edi - 4]
mov eax, dword [esp + 0x28]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x4078ae
test cl, cl
je 0x4078aa
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x4078ae
add eax, 2
add esi, 2
test cl, cl
jne 0x40788a
xor eax, eax
jmp 0x4078b3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4078ea
mov esi, dword [edi]
mov eax, dword [esp + 0x30]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x4078e1
test cl, cl
je 0x4078dd
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x4078e1
add eax, 2
add esi, 2
test cl, cl
jne 0x4078bd
xor eax, eax
jmp 0x4078e6
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4078f7
mov eax, dword [ebp + 0xc]
inc edx
add edi, 0x12
cmp edx, eax
jb 0x407883
jmp 0x407907
mov ecx, dword [ebp]
mov eax, dword [esp + 0x14]
mov byte [esp + 0x2f], 1
mov dword [eax + ecx + 0x14], edx
mov eax, dword [esp + 0x24]
mov edi, dword [esp + 0x14]
mov ecx, dword [ebp + 4]
inc eax
add edi, 0x45
cmp eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], edi
jb 0x407829
mov al, byte [esp + 0x2f]
test al, al
jne 0x4079f2
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push 0x12
push edx
call fcn.00405e80
mov esi, dword [esp + 0x34]
mov dword [ebp + 8], eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov ebx, dword [esp + 0x40]
lea ecx, [ecx + ecx*8]
mov edi, ebx
mov dword [edx + ecx*2 + 4], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov edi, esi
add esp, 0x14
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 + 0x24], edx
mov edx, dword [ebp + 8]
mov esi, edi
mov edi, dword [esp + 0x24]
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, ebx
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 + 0x24], edx
mov edx, dword [ebp + 8]
mov esi, edi
mov edi, dword [esp + 0x24]
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]
inc dword [ebp + 0xc]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jb 0x4076ff
mov eax, dword [ebp + 4]
xor esi, esi
test eax, eax
jbe 0x407a2d
xor edi, edi
mov ecx, dword [ebp]
mov edx, dword [edi + ecx + 0x18]
push edx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov eax, dword [ebp + 4]
add esp, 4
inc esi
add edi, 0x45
cmp esi, eax
jb 0x407a12
mov eax, dword [esp + 0x10]
push eax
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov ecx, dword [esp + 0x20]
push ecx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov edx, dword [esp + 0x30]
push edx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x3c]
push eax
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
jmp 0x40835f
push edi
push 1
lea ecx, [esp + 0xc4]
push 0x18
push ecx
call ebx
mov edx, dword [ebp + 4]
mov eax, dword [ebp]
push edx
push 0x45
push eax
call fcn.00405e80
add esp, 0x1c
mov dword [ebp], eax
jmp 0x408362
cmp eax, 0x1005
jne case.0x407b53.4107
push edi
push 1
lea ecx, [esp + 0x60]
push 4
push ecx
call ebx
mov eax, dword [esp + 0x68]
lea edx, [eax + eax*2]
shl edx, 2
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x6c]
push edi
push ecx
push 0xc
push eax
mov dword [esp + 0x78], eax
call ebx
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x5c]
add esp, 0x24
lea eax, [eax + eax*2]
lea edx, [ecx - 4]
shl eax, 2
cmp edx, eax
je 0x408362
sub ecx, eax
sub ecx, 4
push ecx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x3c]
mov esi, eax
mov eax, dword [esp + 0x5c]
push edi
push 1
lea eax, [eax + eax*2]
shl eax, 2
sub ecx, eax
sub ecx, 4
push ecx
push esi
call ebx
push esi
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
add esp, 0x18
jmp 0x408362
push edi
push 1
lea edx, [esp + 0x44]
push 4
push edx
call ebx
mov eax, dword [esp + 0x4c]
lea eax, [eax + eax*2]
shl eax, 3
push eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x50]
push edi
push ecx
push 0x18
push eax
mov dword [esp + 0x64], eax
call ebx
add esp, 0x24
jmp 0x408362
add eax, 0xffffeff8
cmp eax, 0xa
ja case.0x407b53.4107
xor edx, edx
mov dl, byte [eax + 0x4083a0]
jmp dword [edx*4 + 0x408390]
mov eax, dword [esp + 0xd8]
lea ecx, [esp + 0x20]
push eax
push 1
push 4
push ecx
call dword [sym.imp.MSVCRT.DLL_fread]
mov eax, dword [esp + 0x30]
mov dword [esp + 0x54], eax
lea edx, [eax + eax*4]
shl edx, 2
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edi, eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x64], edi
lea ecx, [eax*4]
push ecx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edx, dword [esp + 0x38]
mov ebx, eax
mov dword [esp + 0x64], ebx
lea eax, [edx*4]
push eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x58]
add esp, 0x1c
xor edx, edx
test eax, eax
jbe 0x407c61
xor eax, eax
mov esi, dword [esp + 0x40]
mov ebx, dword [esp + 0x54]
inc edx
mov ecx, dword [eax + esi]
add eax, 0x18
lea ecx, [ecx + ecx*2]
lea ebx, [ebx + ecx*4]
mov ecx, dword [eax + esi - 0x14]
mov esi, dword [ebx]
lea ecx, [ecx + ecx*4]
lea ecx, [edi + ecx*4]
mov dword [ecx], esi
mov esi, dword [ebx + 4]
mov dword [ecx + 4], esi
mov esi, dword [ebx + 8]
mov ebx, dword [esp + 0x54]
mov dword [ecx + 8], esi
mov esi, dword [esp + 0x40]
mov ecx, dword [eax + esi - 0x10]
lea ecx, [ecx + ecx*2]
lea ebx, [ebx + ecx*4]
mov ecx, dword [eax + esi - 0xc]
mov esi, dword [ebx]
lea ecx, [ecx + ecx*4]
lea ecx, [edi + ecx*4]
mov dword [ecx], esi
mov esi, dword [ebx + 4]
mov dword [ecx + 4], esi
mov esi, dword [ebx + 8]
mov ebx, dword [esp + 0x54]
mov dword [ecx + 8], esi
mov esi, dword [esp + 0x40]
mov ecx, dword [eax + esi - 8]
lea ecx, [ecx + ecx*2]
lea ebx, [ebx + ecx*4]
mov ecx, dword [eax + esi - 4]
mov esi, dword [ebx]
lea ecx, [ecx + ecx*4]
lea ecx, [edi + ecx*4]
mov dword [ecx], esi
mov esi, dword [ebx + 4]
mov dword [ecx + 4], esi
mov esi, dword [ebx + 8]
mov dword [ecx + 8], esi
mov ecx, dword [esp + 0x3c]
cmp edx, ecx
jb 0x407bca
mov ebx, dword [esp + 0x4c]
mov edx, dword [esp + 0x54]
push edx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x3c]
add esp, 4
add eax, 0xfffffffc
xor edi, edi
test eax, eax
mov dword [esp + 0x18], eax
jbe 0x408362
mov ecx, dword [esp + 0xd8]
mov esi, dword [sym.imp.MSVCRT.DLL_fread]
push ecx
push 1
lea edx, [esp + 0x70]
push 1
push edx
call esi
mov ecx, dword [esp + 0x78]
mov eax, dword [esp + 0xe8]
and ecx, 0xff
push eax
push ecx
lea edx, [esp + 0x81]
push 8
push edx
call esi
mov ecx, dword [esp + 0x88]
add esp, 0x20
xor dl, dl
test cl, cl
jbe 0x407cf7
mov eax, dword [esp + 0x48]
mov esi, ebx
sub esi, dword [esp + 0x48]
lea eax, [eax + edi*4]
test dl, dl
jne 0x407cf1
mov ecx, dword [esp + 0x69]
inc edi
mov dword [esi + eax], ecx
mov ecx, dword [esp + 0x6d]
mov dword [eax], ecx
mov ecx, dword [esp + 0x68]
add eax, 4
inc dl
cmp dl, cl
jb 0x407cd8
mov eax, dword [esp + 0x18]
and ecx, 0xff
shl ecx, 3
or edx, 0xffffffff
sub edx, ecx
add eax, edx
mov dword [esp + 0x18], eax
jne 0x407c83
jmp 0x408362
mov edi, dword [esp + 0xd8]
mov esi, dword [sym.imp.MSVCRT.DLL_fread]
push edi
push 1
lea eax, [esp + 0x68]
push 2
push eax
call esi
mov edx, dword [esp + 0x48]
mov ecx, dword [esp + 0x70]
add edx, 0xfffffffe
mov dword [esp + 0x74], ecx
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ebx, eax
mov eax, dword [esp + 0x4c]
push edi
add eax, 0xfffffffe
push 1
push eax
push ebx
call esi
xor edi, edi
add esp, 0x24
cmp word [esp + 0x60], di
mov dword [esp + 0x10], edi
jbe 0x407e85
mov eax, dword [esp + 0x10]
test eax, eax
je 0x407d89
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
push ecx
push 0x45
push edx
call fcn.00405e80
add esp, 0xc
mov dword [ebp], eax
push 0x104
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edx, dword [ebp + 4]
add esp, 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 + 0x18], eax
mov ecx, dword [ebp + 4]
lea eax, [edi + ebx]
mov edx, dword [ebp]
push eax
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
push 0x4532cc
lea ecx, [eax + eax*2]
mov eax, dword [ecx + edx + 0x18]
push eax
call dword [sym.imp.MSVCRT.DLL_sprintf]
mov ecx, dword [ebp + 4]
add edi, eax
mov esi, dword [edi + ebx]
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
mov ecx, dword [ebp]
lea edx, [esi + esi*2]
add edi, 4
lea eax, [eax + eax*2]
mov dword [eax + ecx + 0xc], edx
lea edx, [esi + esi*2]
shl edx, 2
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edx, dword [ebp + 4]
add esp, 0x10
lea ecx, [edx + edx*2]
shl ecx, 3
sub ecx, edx
mov edx, dword [ebp]
lea ecx, [ecx + ecx*2]
mov dword [ecx + edx + 0x10], eax
mov ecx, dword [ebp + 4]
lea eax, [ecx + ecx*2]
shl eax, 3
sub eax, ecx
mov ecx, dword [ebp]
test esi, esi
lea eax, [eax + eax*2]
mov eax, dword [eax + ecx + 0x10]
jle 0x407e63
lea ecx, [eax + 8]
mov eax, dword [edi + ebx]
mov edx, dword [esp + 0x40]
add edi, 4
add ecx, 0xc
lea eax, [eax + eax*2]
shl eax, 3
dec esi
mov edx, dword [eax + edx + 4]
mov dword [ecx - 0x14], edx
mov edx, dword [esp + 0x40]
mov edx, dword [eax + edx + 0xc]
mov dword [ecx - 0x10], edx
mov edx, dword [esp + 0x40]
mov eax, dword [eax + edx + 0x14]
mov dword [ecx - 0xc], eax
jne 0x407e30
mov edx, dword [ebp + 4]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x60]
inc edx
inc eax
and ecx, 0xffff
cmp eax, ecx
mov dword [ebp + 4], edx
mov dword [esp + 0x10], eax
jb 0x407d6c
mov edx, dword [esp + 0x40]
push edx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
push ebx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
add esp, 8
jmp 0x408362
push edi
push 1
lea eax, [esp + 0x28]
push 4
push eax
call ebx
mov eax, dword [esp + 0x44]
add esp, 0x10
cmp eax, 0x1011
jne 0x407ffe
mov eax, dword [esp + 0x20]
lea ecx, [eax + eax*8]
lea edx, [eax + ecx*2]
shl edx, 1
push edx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x24]
add esp, 4
cmp ecx, esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], esi
jbe 0x40817e
lea esi, [eax + 0x22]
mov eax, dword [esp + 0xd8]
push eax
call dword [sym.imp.MSVCRT.DLL_ftell]
mov ecx, dword [esp + 0xdc]
lea edi, [esi - 0x22]
push ecx
push 1
push 0x20
push edi
mov ebx, eax
call dword [sym.imp.MSVCRT.DLL_fread]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0xec]
push 0
not ecx
dec ecx
lea edx, [ecx + ebx + 1]
push edx
push edi
call dword [sym.imp.MSVCRT.DLL_fseek]
push edi
push 1
lea eax, [esi - 2]
push 6
push eax
call dword [sym.imp.MSVCRT.DLL_fread]
mov al, byte [esi - 1]
mov edi, dword [esi]
add esp, 0x30
test al, al
jne 0x407fdd
lea ecx, [edi*8]
push ecx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov edx, dword [esp + 0xdc]
mov ebx, eax
push edx
push edi
push 8
push ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.MSVCRT.DLL_fread]
mov eax, dword [esp + 0x58]
add esp, 0x14
test eax, eax
jbe 0x407fd4
mov ecx, dword [esp + 0x50]
mov eax, dword [esp + 0x48]
mov ebx, dword [esp + 0x4c]
mov edx, dword [esp + 0x44]
add ecx, 0xc
sub ebx, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x14]
cmp dword [eax + ebx], edx
jne 0x407fbf
mov edx, dword [eax]
cmp edx, edi
jae 0x407fbf
mov ebx, dword [esp + 0x10]
mov ebx, dword [ebx + edx*8]
mov dword [ecx], ebx
mov ebx, dword [esp + 0x10]
mov edx, dword [ebx + edx*8 + 4]
mov ebx, dword [esp + 0x1c]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x18]
add eax, 4
add ecx, 0x14
dec edx
mov dword [esp + 0x18], edx
jne 0x407f98
mov ebx, dword [esp + 0x10]
push ebx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x20]
inc eax
add esi, 0x26
cmp eax, ecx
mov dword [esp + 0x14], eax
jb 0x407ee7
mov eax, dword [esp + 0x24]
jmp 0x40817e
cmp eax, 0x1012
jne 0x408187
mov eax, dword [esp + 0x20]
lea ecx, [eax + eax*4]
shl ecx, 3
sub ecx, eax
push ecx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0x24]
add esp, 4
cmp ecx, esi
mov dword [esp + 0x24], eax
mov dword [esp + 0x14], esi
jbe 0x40817e
lea esi, [eax + 0x23]
mov edx, dword [esp + 0xd8]
push edx
call dword [sym.imp.MSVCRT.DLL_ftell]
mov ebx, eax
mov eax, dword [esp + 0xdc]
push eax
lea edi, [esi - 0x23]
push 1
push 0x20
push edi
call dword [sym.imp.MSVCRT.DLL_fread]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0xec]
push 0
not ecx
dec ecx
lea ecx, [ecx + ebx + 1]
push ecx
push edi
call dword [sym.imp.MSVCRT.DLL_fseek]
push edi
push 1
lea edx, [esi - 3]
push 7
push edx
call dword [sym.imp.MSVCRT.DLL_fread]
mov al, byte [esi - 1]
mov edi, dword [esi]
add esp, 0x30
test al, al
jne 0x40812b
lea eax, [edi*8]
push eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esp + 0xdc]
mov ebx, eax
push ecx
push edi
push 8
push ebx
mov dword [esp + 0x24], ebx
call dword [sym.imp.MSVCRT.DLL_fread]
mov eax, dword [esp + 0x58]
add esp, 0x14
test eax, eax
jbe 0x408122
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x48]
mov ebx, dword [esp + 0x4c]
lea ecx, [edx + 0xc]
mov edx, dword [esp + 0x44]
sub ebx, eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x1c], ebx
mov edx, dword [esp + 0x14]
cmp dword [ebx + eax], edx
jne 0x40810d
mov edx, dword [eax]
cmp edx, edi
jae 0x40810d
mov ebx, dword [esp + 0x10]
mov ebx, dword [ebx + edx*8]
mov dword [ecx], ebx
mov ebx, dword [esp + 0x10]
mov edx, dword [ebx + edx*8 + 4]
mov ebx, dword [esp + 0x1c]
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x18]
add eax, 4
add ecx, 0x14
dec edx
mov dword [esp + 0x18], edx
jne 0x4080e6
mov ebx, dword [esp + 0x10]
push ebx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
add esp, 4
mov ebx, dword [esp + 0xd8]
push ebx
call dword [sym.imp.MSVCRT.DLL_ftell]
mov cl, byte [esi - 2]
add esp, 4
test cl, cl
je 0x408146
lea eax, [eax + edi*4]
mov cl, byte [esi - 1]
test cl, cl
jne 0x408152
lea edi, [eax + edi*4]
jmp 0x408155
lea edi, [eax + edi*8]
push 0
push edi
push ebx
call dword [sym.imp.MSVCRT.DLL_fseek]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x2c]
add esp, 0xc
inc eax
add esi, 0x27
cmp eax, ecx
mov dword [esp + 0x14], eax
jb 0x408035
mov eax, dword [esp + 0x24]
push eax
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esp + 0x44]
lea eax, [eax + eax*4]
shl eax, 2
push eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp + 4]
mov edx, dword [esp + 0x68]
mov dword [esp + 0x20], eax
and edx, 0xffff
mov eax, ecx
add esp, 4
sub eax, edx
cmp eax, ecx
mov dword [esp + 0x24], eax
jae 0x408307
lea ecx, [eax + eax*2]
shl ecx, 3
sub ecx, eax
lea eax, [ecx + ecx*2]
mov dword [esp + 0x28], eax
mov ecx, dword [ebp]
mov edx, dword [esp + 0x28]
xor ebx, ebx
lea eax, [edx + ecx]
mov dword [esp + 0x30], ebx
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 0x10]
cmp edx, ebx
jbe 0x40828f
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
mov ecx, dword [esp + 0x14]
xor edi, edi
test ebx, ebx
mov eax, dword [ecx]
lea edx, [eax + eax*4]
mov eax, dword [esp + 0x50]
lea esi, [eax + edx*4]
jbe 0x408238
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x10]
push esi
push edx
call fcn.00407590
add esp, 8
test eax, eax
je 0x408331
mov ecx, dword [esp + 0x10]
inc edi
add ecx, 0x14
cmp edi, ebx
mov dword [esp + 0x10], ecx
jb 0x408212
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x28]
mov ecx, 5
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebp]
add eax, 0x14
mov dword [esp + 0x18], eax
mov ecx, dword [edx + ecx + 0x10]
mov edx, dword [esp + 0x30]
mov word [ecx + edx*2], bx
inc ebx
cmp ebx, 0xffff
jae 0x40828f
mov ecx, dword [ebp]
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x14]
mov esi, dword [edx + ecx + 0xc]
inc eax
add edi, 4
cmp eax, esi
mov dword [esp + 0x30], eax
mov dword [esp + 0x14], edi
jb 0x4081f4
mov eax, dword [ebp]
mov edi, dword [esp + 0x28]
mov ecx, dword [esp + 0x30]
lea esi, [ebx + ebx*4]
mov dword [edi + eax + 0xc], ecx
mov edx, dword [ebp]
shl esi, 2
push esi
mov dword [edi + edx], ebx
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp]
lea edx, [ebx + ebx*2]
shl edx, 2
push edx
mov dword [edi + ecx + 4], eax
call sub.MSVCRT.DLL_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [ebp]
add esp, 8
mov dword [edi + ecx + 8], eax
mov edx, dword [ebp]
mov ecx, esi
mov esi, dword [esp + 0x1c]
mov edi, dword [edi + edx + 4]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, dword [esp + 0x28]
mov ecx, eax
mov eax, dword [esp + 0x24]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
inc eax
add edx, 0x45
cmp eax, ecx
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
jb 0x4081ca
mov ecx, dword [esp + 0x4c]
push ecx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov edx, dword [esp + 0x4c]
push edx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov eax, dword [esp + 0x58]
push eax
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
mov ecx, dword [esp + 0x28]
push ecx
call sub.MSVCRT.DLL_void___cdecl_operator_delete_void__
jmp 0x40835f
mov eax, dword [ebp]
mov ecx, dword [esp + 0x28]
mov edx, dword [ecx + eax + 0x10]
mov eax, dword [esp + 0x30]
mov word [edx + eax*2], di
jmp 0x408268
push edi
call dword [sym.imp.MSVCRT.DLL_ftell]
mov ecx, dword [esp + 0x3c]
push esi
add eax, ecx
push eax
push edi
call dword [sym.imp.MSVCRT.DLL_fseek]
add esp, 0x10
mov ecx, dword [esp + 0x38]
mov eax, dword [esp + 0xe0]
mov edx, 0xfffffff8
sub edx, ecx
add eax, edx
mov dword [esp + 0xe0], eax
jne 0x407633
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc4
ret