Function at 0x4065c0
Capabilities:
Copy file

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40c157
push eax
mov dword fs:[0], esp
sub esp, 0x53c
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea eax, [ebp + 0x23290]
push eax
lea eax, [esp + 0x50]
push str._sfiles.dat
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
lea ecx, [esp + 0x58]
push 0x4107f8
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, eax
xor esi, esi
add esp, 0x14
cmp ebx, esi
jne 0x40665e
lea ecx, [ebp + 0x6c]
call fcn.00402280
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
push 0x68
lea ecx, [esp + 0x14]
mov dword [esp + 0x558], esi
call sub.MFC42.DLL_CString::LoadStringA
mov edx, dword [esp + 0x10]
push esi
push esi
push edx
call sub.MFC42.DLL_AfxMessageBox
lea ecx, [esp + 0x10]
mov dword [esp + 0x554], 0xffffffff
call sub.MFC42.DLL_CString::CString
or eax, 0xffffffff
jmp 0x406b41
mov al, byte [ebx + 0xc]
mov dword [esp + 0x10], esi
test al, 0x10
jne 0x40671c
mov ecx, 0x7d
xor eax, eax
lea edi, [esp + 0x150]
push ebx
rep stosd dword es:[edi], eax
lea eax, [esp + 0x154]
push 0x1f4
push eax
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x40671c
mov esi, 0x4101fc
lea eax, [esp + 0x150]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4066cc
test cl, cl
je 0x4066c8
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4066cc
add eax, 2
add esi, 2
test cl, cl
jne 0x4066a8
xor eax, eax
jmp 0x4066d1
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x406712
mov esi, 0x4107e8
lea eax, [esp + 0x150]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406705
test cl, cl
je 0x406701
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406705
add eax, 2
add esi, 2
test cl, cl
jne 0x4066e1
xor eax, eax
jmp 0x40670a
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x406712
inc dword [esp + 0x10]
test byte [ebx + 0xc], 0x10
je 0x40666d
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov ecx, ebp
call fcn.00406470
lea eax, [esp + 0x4c]
push 0x4107f8
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
lea ecx, [esp + 0x18]
mov ebx, eax
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [ebp + 0x23394]
push 0x4109c8
add ecx, 0x29c
mov dword [esp + 0x558], 1
mov dword [esp + 0x18], 0
call sub.MFC42.DLL_CString::operator_1
mov ecx, dword [ebp + 0x23394]
push 0
call fcn.00404ff0
test byte [ebx + 0xc], 0x10
jne 0x406aac
mov ecx, 0x7d
xor eax, eax
lea edi, [esp + 0x150]
push ebx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x154]
push 0x1f4
push ecx
call dword [sym.imp.MSVCRT.dll_fgets]
add esp, 0xc
test eax, eax
je 0x406aac
mov esi, 0x4101fc
lea eax, [esp + 0x150]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4067ea
test cl, cl
je 0x4067e6
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4067ea
add eax, 2
add esi, 2
test cl, cl
jne 0x4067c6
xor eax, eax
jmp 0x4067ef
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x406aa2
mov esi, 0x4107e8
lea eax, [esp + 0x150]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x406827
test cl, cl
je 0x406823
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x406827
add eax, 2
add esi, 2
test cl, cl
jne 0x406803
xor eax, eax
jmp 0x40682c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x406aa2
lea esi, [ebp + 0x23190]
mov ecx, 0x32
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, 0xa
lea edi, [ebp + 0x23258]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x24]
lea ecx, [esp + 0x150]
push eax
push esi
push str._s__s
push ecx
call dword [sym.imp.MSVCRT.dll_sscanf]
mov edi, dword [sym.imp.MSVCRT.dll_strstr]
push 0x4107c8
push esi
call edi
add esp, 0x18
test eax, eax
jne 0x406b5a
push 0x4107c4
push esi
call edi
add esp, 8
test eax, eax
jne 0x406b5a
fild dword [esp + 0x14]
fidiv dword [esp + 0x10]
fmul qword [0x40dd40]
call sub.MSVCRT.dll__ftol
mov edi, eax
lea eax, [ebp + 0x23290]
push esi
push eax
lea edx, [esp + 0x54]
push 0x410670
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
mov ecx, dword [ebp + 0x23394]
add esp, 0x10
push edi
call fcn.00404ff0
mov edi, dword [esp + 0x14]
or ecx, 0xffffffff
inc edi
xor eax, eax
mov dword [esp + 0x14], edi
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x406aa2
push esi
mov ecx, ebp
call fcn.00406c40
cmp eax, 1
je 0x406aa2
test eax, eax
jne 0x40696e
mov eax, dword [ebp + 0x1196c]
mov edi, dword [ebp + 0x2318c]
mov ecx, eax
mov edx, ebp
shl ecx, 6
add edx, ecx
inc edi
mov dword [ebp + 0x2318c], edi
mov edi, esi
lea edx, [eax + edx + 0x1b84]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp + 0x1196c]
mov ecx, eax
shl ecx, 6
add edx, ecx
mov byte [eax + edx + 0x1bc4], 2
mov eax, dword [ebp + 0x1196c]
inc eax
mov dword [ebp + 0x1196c], eax
jmp 0x406aa2
lea eax, [esp + 0x4c]
push 0
push eax
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
je 0x4069cf
mov eax, dword [ebp + 0x1196c]
mov edi, dword [ebp + 0x2318c]
mov ecx, eax
mov edx, ebp
shl ecx, 6
add edx, ecx
inc edi
mov dword [ebp + 0x2318c], edi
mov edi, esi
lea edx, [eax + edx + 0x1b84]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
inc dword [ebp + 0x1196c]
jmp 0x406aa2
lea ecx, [esp + 0x4c]
push ecx
lea ecx, [esp + 0x20]
call sub.MFC42.DLL_CString::CString_2
lea edx, [esp + 0x1c]
lea eax, [esp + 0x20]
push edx
push eax
mov byte [esp + 0x55c], 3
call fcn.00402b20
add esp, 8
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x558], 4
call fcn.0040b4c8
lea ecx, [esp + 0x20]
mov byte [esp + 0x554], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov byte [esp + 0x554], 1
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx - 8]
lea ecx, [esp + 0x18]
push eax
call sub.MFC42.DLL_CString::GetBuffer
lea edx, [esp + 0x24]
push eax
push edx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x406a97
mov eax, dword [ebp + 0x1196c]
mov edi, dword [ebp + 0x2318c]
mov ecx, eax
mov edx, ebp
shl ecx, 6
add edx, ecx
inc edi
mov dword [ebp + 0x2318c], edi
mov edi, esi
lea edx, [eax + edx + 0x1b84]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
inc dword [ebp + 0x1196c]
push 0xffffffffffffffff
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::ReleaseBuffer
test byte [ebx + 0xc], 0x10
je 0x40678b
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea eax, [ebp + 0x23290]
lea edx, [esp + 0x4c]
push eax
push str._sins_ver.dat
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea eax, [esp + 0x58]
push 0x410880
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x14
test edi, edi
je 0x406b2b
mov eax, dword [ebp + 0x230c0]
xor ebx, ebx
test eax, eax
jle 0x406b21
lea esi, [ebp + 0x132d8]
cmp byte [esi + 0x40], 1
jne 0x406b13
push 0x4109c4
push esi
push str._s__s_n
push edi
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x10
mov eax, dword [ebp + 0x230c0]
inc ebx
add esi, 0x41
cmp ebx, eax
jl 0x406af8
push edi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x18]
mov dword [esp + 0x554], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x54c]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x548
ret
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
lea esi, [ebp + 0x23190]
lea ecx, [esp + 0x14]
push esi
push str.GetUpdateFileNum_FileName__s_
push ecx
mov byte [esp + 0x560], 2
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x20]
add esp, 0xc
push 0
push 0
push edx
call sub.MFC42.DLL_AfxMessageBox
push esi
push str.GetUpdateFileNum___FileName__s_
push str.CUpdateThread
push 0x14
call fcn.0040ab80
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea esi, [ebp + 0x23290]
lea eax, [esp + 0x448]
push esi
push str._sfiles.dat
push eax
call edi
add esp, 0xc
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x186a0
idiv ecx
push edx
push esi
lea edx, [esp + 0x34c]
push str._serrorfiles_d.dat
push edx
call edi
add esp, 0x10
lea eax, [esp + 0x344]
lea ecx, [esp + 0x448]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [ebp + 0x6c]
call fcn.00402280
lea ecx, [esp + 0x14]
mov byte [esp + 0x554], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov dword [esp + 0x554], 0xffffffff
call sub.MFC42.DLL_CString::CString
or eax, 0xffffffff
jmp 0x406b41