Function at 0x414060
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x45f90b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x8dc
push ebx
push ebp
push esi
push edi
mov edi, ecx
xor ebp, ebp
mov dword [esp + 0x18], edi
mov eax, dword [edi + 0xf57c]
cmp eax, ebp
je 0x4144d2
mov ecx, dword [esp + 0x8fc]
push 0x47009c
cmp ecx, ebp
push eax
jne 0x4144aa
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
cmp esi, ebp
mov dword [esp + 0x2c], esi
jne 0x4140d0
mov eax, dword [edi + 0xf57c]
cmp eax, ebp
je 0x4144cc
jmp 0x4144c3
push 0x10002
call sub.MFC42.DLL_operatornew
add esp, 4
cmp eax, ebp
mov dword [esp + 0x20], eax
jne 0x414115
mov eax, dword [edi + 0xf57c]
cmp eax, ebp
je 0x4140f8
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
push esi
mov dword [edi + 0xf57c], ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [edi], 2
xor al, al
jmp 0x414934
mov al, byte [esp + 0x900]
mov dword [esp + 0x24], ebp
test al, al
mov dword [esp + 0x14], ebp
mov byte [esp + 0x13], 0
mov byte [edi + 0xf580], 0
je 0x4141c3
mov ebx, dword [edi + 0xdb84]
lea ecx, [edi + 4]
inc ebx
lea esi, [ebx - 1]
push esi
call fcn.004022c0
test eax, eax
je 0x41416e
mov eax, dword [esp + 0x18]
push esi
lea ecx, [eax + 4]
call fcn.004022c0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edi, dword [esp + 0x18]
not ecx
dec ecx
jmp 0x414170
xor ecx, ecx
push ecx
push esi
lea ecx, [edi + 4]
call fcn.00402a10
mov esi, dword [esp + 0x18]
cmp dword [esp + 0x14], 5
jge 0x414429
mov edi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x20]
push edi
push 0x10000
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fread]
mov esi, eax
add esp, 0x10
cmp esi, 0x10000
mov dword [esp + 0x1c], esi
jge 0x41423f
mov eax, dword [edi + 0xc]
test al, 0x10
je 0x414231
mov byte [esp + 0x13], 1
jmp 0x41423f
mov ebx, dword [edi + 0x70]
cmp ebx, ebp
jle 0x4141cf
lea eax, [ebx - 1]
jmp 0x4141d1
xor eax, eax
lea ecx, [edi + 4]
push eax
call fcn.004022c0
test eax, eax
je 0x414204
cmp ebx, ebp
jle 0x4141e7
lea eax, [ebx - 1]
jmp 0x4141e9
xor eax, eax
mov esi, dword [esp + 0x18]
push eax
lea ecx, [esi + 4]
call fcn.004022c0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x41420a
mov esi, dword [esp + 0x18]
xor ecx, ecx
test ebx, ebx
jle 0x414220
lea eax, [ebx - 1]
push ecx
push eax
lea ecx, [esi + 4]
call fcn.00402a10
jmp 0x41417e
xor eax, eax
push ecx
push eax
lea ecx, [esi + 4]
call fcn.00402a10
jmp 0x41417e
test al, 0x20
je 0x41423f
inc dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
je 0x414419
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
add ecx, edi
xor esi, esi
test edi, edi
mov dword [esp + 0x24], ecx
jle 0x414419
mov ecx, dword [esp + 0x20]
lea edx, [edi - 1]
mov dword [esp + 0x28], edx
lea eax, [edi + ecx]
mov dword [esp + 0x30], eax
jmp 0x414277
mov ecx, dword [esp + 0x20]
cmp byte [esi + ecx], 0
jne 0x41428c
mov edx, dword [esp + 0x18]
mov byte [esi + ecx], 0x23
mov byte [edx + 0xf580], 1
mov al, byte [esi + ecx]
cmp al, 0xd
je 0x4142a4
cmp al, 0xa
je 0x4142a4
mov byte [esp + ebp + 0xe4], al
inc esi
jmp 0x414343
mov al, byte [esp + 0x13]
test al, al
jne 0x41431a
cmp esi, dword [esp + 0x28]
jne 0x41431e
mov ecx, dword [esp + 0x14]
xor eax, eax
cmp ecx, 5
jge 0x4142e7
mov edi, dword [esp + 0x30]
test eax, eax
jne 0x4142e7
mov eax, dword [esp + 0x2c]
push eax
push 1
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
jne 0x4142e0
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 5
jl 0x4142c1
cmp dword [esp + 0x14], 5
je 0x41440d
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
inc edi
inc edx
inc ecx
inc eax
mov dword [esp + 0x28], ecx
mov ecx, dword [esp + 0x20]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x30], edx
mov dword [esp + 0x24], eax
cmp esi, dword [esp + 0x28]
jge 0x41433a
mov al, byte [esi + ecx]
cmp al, 0xd
jne 0x41432e
cmp byte [esi + ecx + 1], 0xa
je 0x414339
cmp al, 0xa
jne 0x41433a
cmp byte [esi + ecx + 1], 0xd
jne 0x41433a
inc esi
inc esi
mov byte [esp + ebp + 0xe4], 0
cmp esi, edi
jne 0x414358
mov al, byte [esp + 0x13]
test al, al
je 0x414358
inc ebp
mov byte [esp + ebp + 0xe4], 0
mov al, byte [esp + ebp + 0xe4]
test al, al
jne 0x4143c5
lea edi, [esp + 0xe4]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 0x18]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea ebp, [edx + 4]
push ecx
lea ecx, [esp + 0xe8]
push ecx
push eax
push ebx
mov ecx, ebp
call fcn.00402c50
test eax, eax
jne 0x414396
mov byte [esp + 0x13], 1
cmp esi, dword [esp + 0x1c]
jne 0x4143a4
mov al, byte [esp + 0x13]
test al, al
jne 0x4143c1
mov edx, ebx
lea edi, [esp + 0xe4]
or ecx, 0xffffffff
xor eax, eax
inc ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, ebp
call fcn.00402a10
xor ebp, ebp
jmp 0x41440d
cmp ebp, 0x400
jne 0x41440c
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0xe4]
push ebp
push eax
lea edi, [ecx + 4]
push 0
push ebx
mov ecx, edi
mov byte [esp + 0x4f4], 0
call fcn.00402c50
test eax, eax
jne 0x4143f8
mov byte [esp + 0x13], 1
mov eax, ebx
push 0x400
push eax
mov ecx, edi
inc ebx
call fcn.00402a10
xor ebp, ebp
jmp 0x41440d
inc ebp
mov edi, dword [esp + 0x1c]
cmp esi, edi
jl 0x414273
mov al, byte [esp + 0x13]
test al, al
je 0x41417a
mov esi, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
push edx
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x24]
push eax
call sub.MFC42.DLL_operatordelete
mov al, byte [esp + 0x908]
add esp, 8
test al, al
jne 0x414919
mov eax, dword [esi + 0x70]
test eax, eax
jle 0x41445a
dec eax
jmp 0x41445c
xor eax, eax
lea edi, [esi + 4]
push eax
mov ecx, edi
mov dword [esi + 0xdb84], eax
call fcn.004022c0
test eax, eax
je 0x41448d
mov eax, dword [esi + 0xdb84]
mov ecx, edi
push eax
call fcn.004022c0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x41448f
xor ecx, ecx
mov edx, dword [esi + 0xdb84]
push 0
push edx
push ecx
push 0x80000012
mov ecx, esi
call fcn.00409870
jmp 0x414919
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
add esp, 8
cmp ebx, ebp
mov dword [esp + 0x30], ebx
jne 0x4144d9
mov eax, dword [edi + 0xf57c]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [edi + 0xf57c], ebp
xor al, al
jmp 0x414934
push 0x10002
call sub.MFC42.DLL_operatornew
mov edi, eax
add esp, 4
test edi, edi
jne 0x414524
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0xf57c]
test eax, eax
je 0x414503
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
push ebx
mov dword [esi + 0xf57c], 0
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [esi], 2
xor al, al
jmp 0x414934
mov ebp, dword [esp + 0x18]
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
xor eax, eax
push 2
push eax
push ebx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x20], eax
mov byte [esp + 0x1f], al
mov byte [ebp + 0xf580], al
call esi
push ebx
call dword [sym.imp.MSVCRT.dll_ftell]
push 0
push 0
push ebx
mov dword [esp + 0x40], eax
call esi
mov eax, dword [esp + 0x40]
add esp, 0x1c
cmp eax, 0x100000
jae 0x414575
shr eax, 2
mov dword [esp + 0x28], eax
jmp 0x4145aa
mov ecx, dword [esp + 0x24]
cmp ecx, 0xa00000
jae 0x41458d
mov eax, 0xcccccccd
mul ecx
shr edx, 3
jmp 0x4145a6
cmp ecx, 0x6400000
mov eax, 0x51eb851f
jae 0x4145a1
mul ecx
shr edx, 3
jmp 0x4145a6
mul ecx
shr edx, 5
mov dword [esp + 0x28], edx
xor esi, esi
lea ecx, [esp + 0x44]
mov dword [esp + 0x38], esi
call fcn.00402030
mov dword [esp + 0x8f4], esi
jmp 0x4145c6
mov ebx, dword [esp + 0x30]
cmp dword [esp + 0x14], 5
jge 0x414846
push ebx
push 0x10000
push 1
push edi
call dword [sym.imp.MSVCRT.dll_fread]
mov ebx, eax
add esp, 0x10
cmp ebx, 0x10000
jge 0x41460d
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx + 0xc]
test al, 0x10
je 0x4145ff
mov byte [esp + 0x13], 1
jmp 0x41460d
test al, 0x20
je 0x41460d
inc dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
lea eax, [ebx + edx]
cmp eax, ecx
jbe 0x414661
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
xor esi, esi
mov dword [esp + 0x3c], edx
lea ecx, [ebx + eax]
mov dword [esp + 0x40], esi
mov dword [esp + 0x34], ecx
fild dword [esp + 0x34]
fmul qword [0x464c68]
fild qword [esp + 0x3c]
fdivp st(1)
call sub.MSVCRT.dll__ftol
push eax
mov eax, dword [esp + 0x900]
push eax
call fcn.0043ab50
add esp, 8
mov dword [esp + 0x38], esi
jmp 0x414665
mov dword [esp + 0x38], eax
test ebx, ebx
je 0x41482c
mov ecx, dword [esp + 0x20]
xor esi, esi
add ecx, ebx
test ebx, ebx
mov dword [esp + 0x20], ecx
jle 0x41482c
lea ecx, [ebx - 1]
lea edx, [ebx + edi]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x34], edx
cmp byte [esi + edi], 0
jne 0x4146a0
mov byte [esi + edi], 0x23
mov byte [ebp + 0xf580], 1
mov al, byte [esi + edi]
cmp al, 0xd
je 0x4146bc
cmp al, 0xa
je 0x4146bc
mov ecx, dword [esp + 0x1c]
inc esi
mov byte [esp + ecx + 0x4e8], al
jmp 0x414757
mov al, byte [esp + 0x13]
test al, al
jne 0x41472a
cmp esi, dword [esp + 0x2c]
jne 0x41472e
mov ecx, dword [esp + 0x14]
xor eax, eax
cmp ecx, 5
jge 0x4146ff
mov ebp, dword [esp + 0x34]
test eax, eax
jne 0x4146ff
mov eax, dword [esp + 0x30]
push eax
push 1
push 1
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
test eax, eax
jne 0x4146f8
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 5
jl 0x4146d9
cmp dword [esp + 0x14], 5
je 0x414820
mov edx, dword [esp + 0x34]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
mov ebp, dword [esp + 0x18]
inc ebx
inc edx
inc ecx
inc eax
mov dword [esp + 0x34], edx
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x20], eax
cmp esi, dword [esp + 0x2c]
jge 0x41474a
mov al, byte [esi + edi]
cmp al, 0xd
jne 0x41473e
cmp byte [esi + edi + 1], 0xa
je 0x414749
cmp al, 0xa
jne 0x41474a
cmp byte [esi + edi + 1], 0xd
jne 0x41474a
inc esi
mov ecx, dword [esp + 0x1c]
inc esi
mov byte [esp + ecx + 0x4e8], 0
cmp esi, ebx
jne 0x414770
mov al, byte [esp + 0x13]
test al, al
je 0x414770
inc ecx
mov dword [esp + 0x1c], ecx
mov byte [esp + ecx + 0x4e8], 0
mov al, byte [esp + ecx + 0x4e8]
test al, al
jne 0x4147d9
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x4e8]
push ecx
push edx
lea ecx, [esp + 0x4c]
call fcn.00402490
test al, al
jne 0x4147a7
mov eax, dword [esp + 0xc4]
mov dword [ebp + 0xf544], eax
mov byte [esp + 0x13], 1
cmp esi, ebx
jne 0x4147cf
mov al, byte [esp + 0x13]
test al, al
je 0x4147cf
mov al, byte [esi + edi - 1]
cmp al, 0xd
je 0x4147bf
cmp al, 0xa
jne 0x4147cf
push 0
push 0x472b1c
lea ecx, [esp + 0x4c]
call fcn.00402490
mov dword [esp + 0x1c], 0
jmp 0x414820
cmp ecx, 0x400
jne 0x41481b
push ecx
lea ecx, [esp + 0x4ec]
push ecx
lea ecx, [esp + 0x4c]
mov byte [esp + 0x8f0], 0
call fcn.00402490
test al, al
jne 0x414811
mov edx, dword [esp + 0xc4]
mov dword [ebp + 0xf544], edx
mov byte [esp + 0x13], 1
mov dword [esp + 0x1c], 0
jmp 0x414820
inc ecx
mov dword [esp + 0x1c], ecx
mov ebp, dword [esp + 0x18]
cmp esi, ebx
jl 0x41468f
mov al, byte [ebp + 0xf582]
test al, al
jne 0x414842
mov al, byte [esp + 0x13]
test al, al
je 0x4145c2
mov ebx, dword [esp + 0x30]
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
push edi
call sub.MFC42.DLL_operatordelete
add esp, 8
lea ecx, [esp + 0x44]
call fcn.00402460
mov al, byte [ebp + 0xf582]
test al, al
je 0x414884
lea ecx, [esp + 0x44]
mov dword [esp + 0x8f4], 0xffffffff
call fcn.00402170
xor al, al
jmp 0x414934
mov bl, byte [esp + 0x900]
test bl, bl
je 0x414898
mov eax, dword [ebp + 0xdb84]
inc eax
jmp 0x41489b
or eax, 0xffffffff
push eax
lea esi, [ebp + 4]
lea eax, [esp + 0x48]
mov ecx, esi
push eax
call fcn.00405eb0
test bl, bl
jne 0x414901
mov eax, dword [ebp + 0x70]
test eax, eax
jle 0x4148b9
dec eax
jmp 0x4148bb
xor eax, eax
push eax
mov ecx, esi
mov dword [ebp + 0xdb84], eax
call fcn.004022c0
test eax, eax
je 0x4148e9
mov eax, dword [ebp + 0xdb84]
mov ecx, esi
push eax
call fcn.004022c0
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
jmp 0x4148eb
xor ecx, ecx
mov edx, dword [ebp + 0xdb84]
push 0
push edx
push ecx
push 0x80000012
mov ecx, ebp
call fcn.00409870
lea ecx, [esp + 0x44]
mov dword [esp + 0x8f4], 0xffffffff
call fcn.00402170
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 0xf57c]
push eax
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esi + 0xf57c], 0
mov al, 1
mov ecx, dword [esp + 0x8ec]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x8e8
ret 8