Function at 0x4099b0
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 0x4099f2
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 0x409eed
je 0x409eba
cmp eax, 0x1004
ja 0x409e33
je 0x409e0a
cmp eax, 0x905
jb case.0x409f03.4107
cmp eax, 0x907
ja case.0x409f03.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 0x409db7
cmp dword [esp + 0x34], 0x905
je 0x409b56
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 0x4ed6b8
push eax
call edi
mov edx, dword [esp + 0x3c]
add esi, eax
add esp, 0xc
lea ecx, [esi + ebx]
push ecx
push 0x4ed6bc
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 0x409b24
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 0x4ed6c0
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 0x409bbb
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 0x4ed6c4
push ecx
call ebx
add esi, eax
mov eax, dword [esp + 0x3c]
add esp, 0xc
lea edx, [esi + edi]
push edx
push 0x4ed6c8
push eax
call ebx
mov edx, dword [esp + 0x34]
lea esi, [esi + eax + 0xa]
add esp, 0xc
lea ecx, [esi + edi]
push ecx
push 0x4ed6cc
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 0x409ce2
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 0x409c0d
test cl, cl
je 0x409c09
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x409c0d
add eax, 2
add esi, 2
test cl, cl
jne 0x409be5
xor eax, eax
jmp 0x409c12
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x409cb7
mov eax, dword [ebp + 0xc]
xor edx, edx
mov dword [edi + 0x14], eax
mov eax, dword [ebp + 0xc]
test eax, eax
jbe 0x409cb7
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 0x409c5e
test cl, cl
je 0x409c5a
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x409c5e
add eax, 2
add esi, 2
test cl, cl
jne 0x409c3a
xor eax, eax
jmp 0x409c63
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x409c9a
mov esi, dword [edi]
mov eax, dword [esp + 0x30]
mov bl, byte [eax]
mov cl, bl
cmp bl, byte [esi]
jne 0x409c91
test cl, cl
je 0x409c8d
mov bl, byte [eax + 1]
mov cl, bl
cmp bl, byte [esi + 1]
jne 0x409c91
add eax, 2
add esi, 2
test cl, cl
jne 0x409c6d
xor eax, eax
jmp 0x409c96
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x409ca7
mov eax, dword [ebp + 0xc]
inc edx
add edi, 0x12
cmp edx, eax
jb 0x409c33
jmp 0x409cb7
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 0x409bd9
mov al, byte [esp + 0x2f]
test al, al
jne 0x409da2
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push 0x12
push edx
call fcn.00408230
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 0x409aaf
mov eax, dword [ebp + 4]
xor esi, esi
test eax, eax
jbe 0x409ddd
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 0x409dc2
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 0x40a70f
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.00408230
add esp, 0x1c
mov dword [ebp], eax
jmp 0x40a712
cmp eax, 0x1005
jne case.0x409f03.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 0x40a712
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 0x40a712
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 0x40a712
add eax, 0xffffeff8
cmp eax, 0xa
ja case.0x409f03.4107
xor edx, edx
mov dl, byte [eax + 0x40a750]
jmp dword [edx*4 + 0x40a740]
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 0x40a011
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 0x409f7a
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 0x40a712
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 0x40a0a7
mov eax, dword [esp + 0x48]
mov esi, ebx
sub esi, dword [esp + 0x48]
lea eax, [eax + edi*4]
test dl, dl
jne 0x40a0a1
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 0x40a088
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 0x40a033
jmp 0x40a712
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 0x40a235
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40a139
mov ecx, dword [ebp + 4]
mov edx, dword [ebp]
push ecx
push 0x45
push edx
call fcn.00408230
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 0x4ed6d0
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 0x40a213
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 0x40a1e0
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 0x40a11c
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 0x40a712
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 0x40a3ae
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 0x40a52e
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 0x40a38d
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 0x40a384
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 0x40a36f
mov edx, dword [eax]
cmp edx, edi
jae 0x40a36f
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 0x40a348
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 0x40a297
mov eax, dword [esp + 0x24]
jmp 0x40a52e
cmp eax, 0x1012
jne 0x40a537
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 0x40a52e
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 0x40a4db
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 0x40a4d2
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 0x40a4bd
mov edx, dword [eax]
cmp edx, edi
jae 0x40a4bd
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 0x40a496
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 0x40a4f6
lea eax, [eax + edi*4]
mov cl, byte [esi - 1]
test cl, cl
jne 0x40a502
lea edi, [eax + edi*4]
jmp 0x40a505
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 0x40a3e5
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 0x40a6b7
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 0x40a63f
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 0x40a5e8
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], ecx
mov edx, dword [esp + 0x10]
push esi
push edx
call fcn.00409940
add esp, 8
test eax, eax
je 0x40a6e1
mov ecx, dword [esp + 0x10]
inc edi
add ecx, 0x14
cmp edi, ebx
mov dword [esp + 0x10], ecx
jb 0x40a5c2
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 0x40a63f
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 0x40a5a4
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 0x40a57a
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 0x40a70f
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 0x40a618
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 0x4099e3
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc4
ret