Function at 0x402190
Capabilities:
Copy file
Get common file path
Move file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x458
mov eax, dword [0x410008]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov ebx, ecx
mov dword [ebp - 0x458], ecx
mov ecx, dword [ebp + 0x10]
mov esi, edx
mov dword [ebp - 0x450], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x448], esi
mov dword [ebp - 0x44c], eax
mov dword [ebp - 0x454], ecx
push edi
test cl, cl
jns 0x4022d5
test ebx, ebx
je 0x402205
mov ecx, 0x7fffffff
mov eax, ebx
cmp word [eax], 0
je 0x4021f2
add eax, 2
sub ecx, 1
jne 0x4021e4
mov eax, 0x7fffffff
mov edx, ecx
sub eax, ecx
neg edx
sbb edx, edx
and edx, eax
test ecx, ecx
jne 0x402207
xor edx, edx
lea esi, [ebx - 2]
lea esi, [esi + edx*2]
nop dword [eax]
lea eax, [esi - 4]
sub esi, 2
cmp word [eax], 0x5c
jne 0x402210
push 0x208
lea eax, [ebp - 0x234]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x234]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ecx, 0x104
lea eax, [ebp - 0x234]
nop
cmp word [eax], 0
je 0x40225e
add eax, 2
sub ecx, 1
jne 0x402250
mov edx, 0x104
mov edi, ecx
mov eax, edx
sub eax, ecx
neg edi
sbb edi, edi
and edi, eax
test ecx, ecx
je 0x4022ad
lea ecx, [ebp - 0x234]
lea ecx, [ecx + edi*2]
sub edx, edi
je 0x4022a0
mov eax, 0x7ffffffe
sub esi, ecx
test eax, eax
je 0x4022a0
movzx edi, word [esi + ecx]
test di, di
je 0x4022a0
mov word [ecx], di
dec eax
add ecx, 2
sub edx, 1
jne 0x402287
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
push 0
lea eax, [ebp - 0x234]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
mov ecx, dword [ebp - 0x454]
lea ebx, [ebp - 0x234]
mov esi, dword [ebp - 0x448]
mov dword [ebp - 0x458], ebx
test cl, 0x40
je 0x40245f
mov edi, dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
xorps xmm0, xmm0
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x10], 0
movq qword [ebp - 0x18], xmm0
mov word [ebp - 0xc], 0
call edi
add eax, dword [ebp - 0x454]
movzx esi, si
add esi, eax
mov dword [ebp - 0x444], 0
lea eax, [ebp - 0x444]
mov dword [ebp - 0x440], 0
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [ebp - 0x444]
add eax, esi
push eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
add esp, 4
xor esi, esi
lea ebx, [esi + 0x1a]
call edi
cdq
mov ecx, 3
idiv ecx
test edx, edx
jne 0x40235f
call edi
cdq
mov ecx, 0xa
idiv ecx
add edx, 0x30
jmp 0x402376
cmp edx, 1
jne 0x40236e
call edi
cdq
idiv ebx
add edx, 0x41
jmp 0x402376
call edi
cdq
idiv ebx
add edx, 0x61
movzx eax, dx
mov word [ebp + esi*2 - 0x28], ax
inc esi
cmp esi, 0xa
jne 0x402342
push 0x208
xor edi, edi
mov dword [ebp - 0x14], 0x64002e
lea eax, [ebp - 0x43c]
mov dword [ebp - 0x10], 0x6c006c
push edi
push eax
call sub.VCRUNTIME140.dll_memset
mov ebx, dword [ebp - 0x458]
lea ecx, [ebp - 0x43c]
mov esi, ebx
mov eax, ecx
add esp, 0xc
mov edx, 0x104
sub esi, eax
lea eax, [edx + 0x7ffffefa]
test eax, eax
je 0x4023de
movzx eax, word [esi + ecx]
test ax, ax
je 0x4023de
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x4023c0
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
test ebx, ebx
je 0x402416
mov ecx, 0x7fffffff
mov eax, ebx
cmp word [eax], di
je 0x402403
add eax, 2
sub ecx, 1
jne 0x4023f6
mov edx, 0x7fffffff
mov eax, ecx
sub edx, ecx
neg eax
sbb eax, eax
and eax, edx
test ecx, ecx
jne 0x402418
xor eax, eax
lea ecx, [ebx + eax*2]
nop dword [eax + eax]
cmp word [ecx - 4], 0x5c
lea eax, [ecx - 4]
lea ecx, [ecx - 2]
jne 0x402420
movups xmm0, xmmword [ebp - 0x28]
mov eax, dword [ebp - 0x10]
push ebx
movups xmmword [ecx], xmm0
movq xmm0, qword [ebp - 0x18]
movq qword [ecx + 0x10], xmm0
mov dword [ecx + 0x18], eax
lea eax, [ebp - 0x43c]
push eax
mov word [ecx + 0x1c], di
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__wrename]
mov ecx, dword [ebp - 0x454]
add esp, 8
mov esi, dword [ebp + 8]
xor eax, eax
mov edi, dword [ebp - 0x448]
mov edx, esi
sub edx, eax
je 0x4024b0
sub edx, 1
je 0x402495
sub edx, 1
jne 0x4024d0
push dword [ebp - 0x450]
mov edx, edi
push dword [ebp - 0x44c]
push ecx
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.00405220
jmp 0x4024c9
push dword [ebp - 0x450]
mov edx, edi
push dword [ebp - 0x44c]
push ecx
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.00402d30
jmp 0x4024c9
push dword [ebp - 0x450]
mov edx, edi
push dword [ebp - 0x44c]
push ecx
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.00402fe0
add esp, 0x10
test eax, eax
jne 0x40250c
mov ecx, dword [ebp - 0x44c]
mov ecx, dword [ecx]
test ecx, ecx
jne 0x4024f0
lea eax, [ecx + 0x1d]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040a480
mov esp, ebp
pop ebp
ret
cmp esi, 2
je 0x40250c
push dword [ebp - 0x450]
mov edx, dword [ebp - 0x454]
push ecx
mov ecx, edi
call fcn.00402940
add esp, 8
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040a480
mov esp, ebp
pop ebp
ret