Function at 0x406f70
Capabilities:
Copy file
Create directory
Write file on windows

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x40c1b2
push eax
mov dword fs:[0], esp
sub esp, 0x4f8
xor eax, eax
lea edx, [esp + 0x10]
push ebx
push ebp
push esi
mov ebx, ecx
push edi
mov edi, 0x410ad4
or ecx, 0xffffffff
lea ebp, [ebx + 0x23290]
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
lea eax, [ebx + 0x230c4]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
push ebp
lea ecx, [esp + 0x38]
push 0x410670
push ecx
call esi
lea edx, [esp + 0x30]
lea eax, [esp + 0x40]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x406ff6
mov dword [esp + 0x18], eax
jmp 0x407016
push 2
push 0
push edi
call dword [sym.imp.MSVCRT.dll_fseek]
push edi
call dword [sym.imp.MSVCRT.dll_ftell]
push edi
mov dword [esp + 0x2c], eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
mov ecx, dword [esp + 0x18]
mov dword [ebx + 0x2328c], 0
mov dword [ebx + 0x23288], ecx
lea ecx, [ebx + 0x6c]
mov dword [esp + 0x28], ecx
call fcn.004023e0
test eax, eax
mov dword [esp + 0x14], eax
jle 0x407121
fild dword [esp + 0x14]
sub esp, 8
lea edx, [esp + 0x13c]
sub esp, 8
mov dword [ebx + 0x2328c], eax
fmul dword [0x40dd48]
fstp qword [esp + 8]
fild dword [esp + 0x28]
fmul dword [0x40dd48]
fstp qword [esp]
push str._.2f_KB__.2f_KB
push edx
call esi
add esp, 0x18
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_1
mov eax, dword [0x410dc0]
mov dword [esp + 0x510], 0
cmp eax, 0x20a
jne 0x4070a6
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::Empty
jmp 0x4070bf
lea eax, [ebx + 0x23190]
lea ecx, [esp + 0x10]
push eax
push 0x410ab8
push ecx
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov ecx, dword [ebx + 0x23394]
lea edx, [esp + 0x10]
push edx
add ecx, 0x2a4
call fcn.0040b4c8
mov ecx, dword [ebx + 0x23394]
lea eax, [esp + 0x134]
push eax
add ecx, 0x2a0
call sub.MFC42.DLL_CString::operator_1
fild dword [esp + 0x18]
fidiv dword [esp + 0x14]
fmul qword [0x40dd40]
call sub.MSVCRT.dll__ftol
mov ecx, dword [ebx + 0x23394]
push eax
call fcn.00404ff0
lea ecx, [esp + 0x10]
mov dword [esp + 0x510], 0xffffffff
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
lea edx, [esp + 0x30]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebx + 0x23280], eax
test eax, eax
jne 0x40753c
mov ecx, 0x32
lea edi, [esp + 0x134]
rep stosd dword es:[edi], eax
lea edi, [ebx + 0x230c4]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, ecx
dec eax
test eax, eax
jle 0x4071a7
lea ecx, [eax - 1]
mov dword [esp + 0x14], ecx
cmp byte [ebx + eax + 0x230c4], 0x5c
lea edx, [ebx + 0x230c4]
jne 0x407199
mov esi, edx
mov edx, ecx
lea edi, [esp + 0x134]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
mov ecx, dword [esp + 0x14]
dec eax
dec ecx
test eax, eax
mov dword [esp + 0x14], ecx
jg 0x40716c
lea eax, [esp + 0x134]
lea ecx, [esp + 0x30]
push eax
push ebp
push 0x410670
push ecx
call esi
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.MSVCRT.dll__mkdir]
add esp, 0x14
test eax, eax
jne 0x4072c0
lea edi, [ebx + 0x230c4]
lea eax, [esp + 0x30]
push edi
push ebp
push 0x410670
push eax
call esi
lea ecx, [esp + 0x30]
lea edx, [esp + 0x40]
push ecx
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x18
mov dword [ebx + 0x23280], eax
test eax, eax
jne 0x40753c
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
push edi
lea eax, [esp + 0x18]
push str.GetFile_FileName__s_
push eax
mov dword [esp + 0x51c], 1
call sub.MFC42.DLL_CString::Format
mov ecx, dword [esp + 0x20]
add esp, 0xc
push 0
push 0
push ecx
call sub.MFC42.DLL_AfxMessageBox
push edi
push str.GetFile___FileName__s_
push str.CUpdateThread
push 0x14
call fcn.0040ab80
add esp, 0x10
lea edx, [esp + 0x300]
push ebp
push str._sfiles.dat
push edx
call esi
add esp, 0xc
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x186a0
idiv ecx
push edx
push ebp
lea edx, [esp + 0x204]
push str._serrorfiles_d.dat
push edx
call esi
add esp, 0x10
lea eax, [esp + 0x1fc]
lea ecx, [esp + 0x300]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ecx, dword [esp + 0x28]
call fcn.00402280
lea ecx, [esp + 0x14]
mov dword [esp + 0x510], 0xffffffff
call sub.MFC42.DLL_CString::CString
jmp 0x4075e4
lea edx, [esp + 0x134]
lea ecx, [esp + 0x10]
push edx
call sub.MFC42.DLL_CString::CString_2
lea eax, [esp + 0x24]
push 1
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x518], 2
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
push 0x410058
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x24]
test eax, eax
setne byte [esp + 0x1f]
call sub.MFC42.DLL_CString::CString
mov al, byte [esp + 0x1f]
test al, al
je 0x407323
push 0x410058
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
push 0x5c
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::ReverseFind
push 0x5c
lea ecx, [esp + 0x14]
mov dword [esp + 0x28], eax
call sub.MFC42.DLL_CString::Find_3
mov ecx, dword [esp + 0x10]
mov esi, eax
cmp byte [esi + ecx - 1], 0x3a
jne 0x407359
inc esi
lea ecx, [esp + 0x10]
push esi
push 0x5c
call sub.MFC42.DLL_CString::Find
mov esi, eax
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_1
cmp esi, 0xffffffff
mov byte [esp + 0x510], 3
je 0x4073fe
mov edi, dword [sym.imp.MSVCRT.dll__access]
cmp esi, dword [esp + 0x24]
jg 0x4073fe
inc esi
lea edx, [esp + 0x2c]
push esi
push edx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x514], 4
call fcn.0040b4c8
lea ecx, [esp + 0x2c]
mov byte [esp + 0x510], 3
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x30]
push eax
push ebp
push 0x410670
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edx, [esp + 0x40]
push 0
push edx
call edi
add esp, 0x18
cmp eax, 0xffffffff
jne 0x4073e7
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.MSVCRT.dll__mkdir]
add esp, 4
push esi
push 0x5c
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Find
mov esi, eax
cmp esi, 0xffffffff
jne 0x407379
mov edi, dword [sym.imp.MSVCRT.dll_sprintf]
lea esi, [ebx + 0x230c4]
push esi
push ebp
lea ecx, [esp + 0x38]
push 0x410670
push ecx
call edi
lea edx, [esp + 0x30]
lea eax, [esp + 0x40]
push edx
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 0x18
mov dword [ebx + 0x23280], eax
test eax, eax
jne 0x407511
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_1
push esi
lea ecx, [esp + 0x1c]
push 0x410a24
push ecx
mov byte [esp + 0x51c], 5
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x24]
add esp, 0xc
push 0
push 0
push edx
call sub.MFC42.DLL_AfxMessageBox
push esi
push 0x410a00
push str.CUpdateThread
push 0x14
call fcn.0040ab80
add esp, 0x10
lea eax, [esp + 0x1fc]
push ebp
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 ebp
lea edx, [esp + 0x308]
push str._serrorfiles_d.dat
push edx
call edi
add esp, 0x10
lea eax, [esp + 0x300]
lea ecx, [esp + 0x1fc]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ecx, dword [esp + 0x28]
call fcn.00402280
lea ecx, [esp + 0x18]
mov byte [esp + 0x510], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x510], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x510], 0xffffffff
call sub.MFC42.DLL_CString::CString
jmp 0x4075e4
lea ecx, [esp + 0x14]
mov byte [esp + 0x510], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov dword [esp + 0x510], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x28]
push edx
call fcn.004023f0
mov edi, eax
test edi, edi
jl 0x40755e
mov ecx, ebx
call fcn.00407600
xor eax, eax
jmp 0x4075e7
mov eax, dword [ebx + 0x23280]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
cmp edi, 0xfffffff6
jne 0x4075d1
call dword [sym.imp.MSVCRT.dll_rand]
cdq
mov ecx, 0x186a0
idiv ecx
push edx
push ebp
lea edx, [esp + 0x40c]
push str._serrorHead_d.dat
push edx
call esi
lea eax, [esp + 0x414]
push 0x410544
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 0x18
test esi, esi
je 0x4075e4
mov ecx, dword [ebx + 0xb84]
push esi
push 1
add ebx, 0x76c
push ecx
push ebx
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x14
jmp 0x4075e4
cmp edi, 0xfffffff5
jne 0x4075e4
lea edx, [esp + 0x30]
push edx
call dword [sym.imp.MSVCRT.dll__unlink]
add esp, 4
or eax, 0xffffffff
mov ecx, dword [esp + 0x508]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x504
ret