Function at 0x402460
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x20
push ebx
push esi
mov esi, ecx
push 0x416044
mov dword [esp + 0x10], esi
lea eax, [esi + 0x8c]
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
xor eax, eax
add esp, 8
cmp ebx, eax
mov dword [esp + 0x10], ebx
mov dword [esi + 0x294], eax
mov dword [esi + 0x290], eax
je 0x402806
mov ecx, dword [esi + 0x84]
push ebp
mov eax, ecx
push edi
mov edi, dword [esi + 0x80]
cmp eax, ecx
je 0x4024be
mov edx, dword [eax]
add eax, 4
mov dword [edi], edx
add edi, 4
cmp eax, ecx
jne 0x4024b0
mov eax, dword [esi + 0x84]
lea ebp, [esi + 0x7c]
push eax
push edi
mov ecx, ebp
call fcn.0040ae40
mov dword [ebp + 8], edi
mov edx, dword [esi + 0x74]
mov edi, dword [esi + 0x70]
lea ebp, [esi + 0x6c]
mov eax, edx
mov dword [esp + 0x10], edi
cmp eax, edx
je 0x402505
mov ecx, 5
mov esi, eax
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 0x10]
add eax, 0x14
add edi, 0x14
cmp eax, edx
mov dword [esp + 0x10], edi
jne 0x4024e6
mov esi, dword [esp + 0x14]
mov ecx, dword [ebp + 8]
push ecx
push edi
mov ecx, ebp
call fcn.0040ae40
push 2
push 0
push ebx
mov dword [ebp + 8], edi
call dword [sym.imp.MSVCRT.dll_fseek]
mov edi, dword [esi + 0x28c]
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
sub eax, edi
push edi
push ebx
mov dword [esi + 0x290], eax
mov dword [esi + 0x294], 0
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0x1c
push ebx
mov byte [esp + 0x20], 0x53
call dword [sym.imp.MSVCRT.dll_ftell]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push ebx
push 1
lea edx, [esp + 0x28]
push 5
push edx
mov dword [esi + 0x294], eax
call edi
add esp, 0x14
test eax, eax
je 0x4027ee
cmp byte [esp + 0x1c], 0x53
jne 0x4027ee
mov eax, dword [esp + 0x1d]
and eax, 0x3f
jne 0x4025a7
push ebx
push 1
lea eax, [esp + 0x29]
push 4
push eax
call edi
add esp, 0x10
test eax, eax
je 0x4027ee
jmp 0x4025ab
mov dword [esp + 0x21], eax
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [esp + 0x21]
add esp, 4
and ecx, 0x1c0
mov dword [esp + 0x28], eax
cmp ecx, 0x100
jne 0x4025e4
push ebx
push 1
lea edx, [esp + 0x34]
push 4
push edx
call edi
add esp, 0x10
test eax, eax
je 0x4027ee
jmp 0x4025f5
mov eax, dword [esp + 0x21]
push 1
push eax
push ebx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov ecx, dword [esp + 0x1d]
and ecx, 0x1c0
cmp ecx, 0x40
jne 0x402643
mov eax, dword [ebp + 4]
test eax, eax
jne 0x402611
mov dword [esp + 0x10], eax
jmp 0x40262b
mov ecx, dword [ebp + 8]
sub ecx, eax
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
mov dword [esp + 0x10], edx
mov edx, dword [esi + 0x84]
add esi, 0x7c
lea ecx, [esp + 0x10]
push ecx
push 1
push edx
mov ecx, esi
call fcn.00402c30
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sub ecx, ebx
mov eax, 0x66666667
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jae 0x40271c
mov ecx, ebp
call fcn.00402c00
cmp eax, 1
jbe 0x40267c
mov ecx, ebp
call fcn.00402c00
mov esi, eax
jmp 0x402681
mov esi, 1
mov ecx, ebp
call fcn.00402c00
mov edi, eax
add edi, esi
mov eax, edi
jns 0x402692
xor eax, eax
lea ecx, [eax + eax*4]
shl ecx, 2
push ecx
call sub.MFC42.DLL_operatornew
mov edx, dword [ebp + 4]
add esp, 4
mov esi, eax
mov ecx, ebp
push esi
push ebx
push edx
call fcn.00402e40
lea ecx, [esp + 0x1c]
mov dword [esp + 0x10], eax
push ecx
push 1
push eax
mov ecx, ebp
call fcn.00402e80
mov edx, dword [esp + 0x10]
mov eax, dword [ebp + 8]
add edx, 0x14
mov ecx, ebp
push edx
push eax
push ebx
call fcn.00402e40
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 4]
push ecx
push edx
mov ecx, ebp
call fcn.0040ae40
mov eax, dword [ebp + 4]
push eax
call sub.MFC42.DLL_operatordelete
lea ecx, [edi + edi*4]
add esp, 4
lea edx, [esi + ecx*4]
mov ecx, ebp
mov dword [ebp + 0xc], edx
call fcn.00402c00
inc eax
mov ebx, dword [esp + 0x18]
mov dword [ebp + 4], esi
lea eax, [eax + eax*4]
lea ecx, [esi + eax*4]
mov esi, dword [esp + 0x14]
mov dword [ebp + 8], ecx
jmp 0x40254b
mov ecx, ebx
mov eax, 0x66666667
sub ecx, ebx
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
cmp edx, 1
jae 0x4027a1
lea ecx, [ebx + 0x14]
push ecx
push ebx
push ebx
mov ecx, ebp
call fcn.00402e40
mov esi, dword [ebp + 8]
lea edx, [esp + 0x1c]
mov ecx, esi
mov eax, 0x66666667
sub ecx, ebx
push edx
imul ecx
sar edx, 3
mov eax, edx
mov ecx, 1
shr eax, 0x1f
add edx, eax
sub ecx, edx
push ecx
push esi
mov ecx, ebp
call fcn.00402e80
mov eax, dword [ebp + 8]
cmp ebx, eax
je 0x40278b
mov edi, ebx
add ebx, 0x14
mov ecx, 5
lea esi, [esp + 0x1c]
cmp ebx, eax
rep movsd dword es:[edi], dword [esi]
jne 0x402777
mov eax, dword [ebp + 8]
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
add eax, 0x14
mov dword [ebp + 8], eax
jmp 0x40254b
lea eax, [ebx - 0x14]
push ebx
push ebx
push eax
mov ecx, ebp
mov dword [esp + 0x1c], eax
call fcn.00402e40
mov edx, dword [ebp + 8]
lea eax, [edx - 0x14]
cmp ebx, eax
je 0x4027d1
sub eax, 0x14
sub edx, 0x14
mov ecx, 5
mov esi, eax
mov edi, edx
cmp eax, ebx
rep movsd dword es:[edi], dword [esi]
jne 0x4027bc
lea eax, [ebx + 0x14]
cmp ebx, eax
je 0x40278b
mov edi, ebx
add ebx, 0x14
mov ecx, 5
lea esi, [esp + 0x1c]
cmp ebx, eax
rep movsd dword es:[edi], dword [esi]
jne 0x4027d8
jmp 0x40278b
mov edx, dword [esi + 0x290]
push ebx
mov dword [esi + 0x294], edx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x20
ret