Function at 0x406220
Capabilities:
Copy file
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f5a1
mov eax, dword fs:[0]
push eax
sub esp, 0x4c4
mov eax, dword [0x43f1c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x248]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x4062cf
push 0x438ed0
lea ecx, [ebp - 0x468]
call fcn.00408e20
lea ecx, [ebp - 0x468]
mov dword [ebp - 4], 0
call fcn.00405a20
mov ecx, dword [ebp - 0x454]
cmp ecx, 7
jbe 0x40668f
mov edx, dword [ebp - 0x468]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406685
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066a9
jmp 0x406685
lea eax, ds:[ebp - 0x248]
push eax
lea ecx, [ebp - 0x4cc]
call fcn.00408e20
push ecx
mov edx, eax
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x480]
call fcn.0040a000
add esp, 4
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x4b8]
cmp ecx, 7
jbe 0x406348
mov edx, dword ds:[ebp - 0x4cc]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40633c
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066ae
push ecx
push edx
call fcn.00416efb
add esp, 8
xor eax, eax
mov dword [ebp - 0x4bc], 0
cmp dword [ebp - 0x46c], 7
mov word [ebp - 0x4cc], ax
lea eax, [ebp - 0x480]
cmova eax, dword [ebp - 0x480]
push 0
push eax
mov dword [ebp - 0x4b8], 7
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4064b3
call esi
nop word [eax + eax]
cmp eax, 0xb7
je 0x4064b3
call esi
mov ecx, eax
lea esi, [ebp - 0x12]
mov eax, 0xcccccccd
sub esi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [esi], cx
mov ecx, edx
test ecx, ecx
jne 0x4063b2
push ecx
lea eax, [ebp - 0x12]
push eax
push esi
lea ecx, [ebp - 0x4b0]
call fcn.0040b700
lea eax, ds:[ebp - 0x4b0]
mov byte [ebp - 4], 7
push eax
mov edx, 0x438fa8
lea ecx, [ebp - 0x498]
call fcn.00409d40
add esp, 4
mov ecx, eax
mov byte [ebp - 4], 8
call fcn.00405a20
mov ecx, dword [ebp - 0x484]
cmp ecx, 7
jbe 0x406453
mov edx, dword [ebp - 0x498]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406449
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066b3
push ecx
push edx
call fcn.00416efb
add esp, 8
mov ecx, dword [ebp - 0x49c]
xor eax, eax
mov dword [ebp - 0x488], 0
mov dword [ebp - 0x484], 7
mov word [ebp - 0x498], ax
cmp ecx, 7
jbe 0x406653
mov edx, dword [ebp - 0x4b0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406649
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066b3
jmp 0x406649
push 0x104
lea eax, [ebp - 0x450]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push ecx
lea edx, [ebp - 0x480]
lea ecx, [ebp - 0x468]
call fcn.00409ea0
add esp, 4
mov byte [ebp - 4], 4
lea eax, [ebp - 0x468]
cmp dword [ebp - 0x454], 7
push 0
cmova eax, dword [ebp - 0x468]
push eax
lea eax, [ebp - 0x450]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
jne 0x406613
call esi
mov ecx, eax
lea esi, [ebp - 0x12]
mov eax, 0xcccccccd
sub esi, 2
mul ecx
shr edx, 3
lea eax, [edx + edx*4]
add eax, eax
sub ecx, eax
add ecx, 0x30
mov word [esi], cx
mov ecx, edx
test ecx, ecx
jne 0x406515
push ecx
lea eax, [ebp - 0x12]
push eax
push esi
lea ecx, [ebp - 0x4b0]
call fcn.0040b700
lea eax, ds:[ebp - 0x4b0]
mov byte [ebp - 4], 5
push eax
mov edx, 0x438f68
lea ecx, [ebp - 0x498]
call fcn.00409d40
add esp, 4
mov ecx, eax
mov byte [ebp - 4], 6
call fcn.00405a20
mov ecx, dword [ebp - 0x484]
cmp ecx, 7
jbe 0x4065b3
mov edx, dword [ebp - 0x498]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4065a9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066b8
push ecx
push edx
call fcn.00416efb
add esp, 8
mov ecx, dword [ebp - 0x49c]
xor eax, eax
mov dword [ebp - 0x488], 0
mov dword [ebp - 0x484], 7
mov word [ebp - 0x498], ax
cmp ecx, 7
jbe 0x406613
mov edx, dword [ebp - 0x4b0]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406609
mov edx, dword ds:[eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066b8
push ecx
push edx
call fcn.00416efb
add esp, 8
mov ecx, dword [ebp - 0x454]
cmp ecx, 7
jbe 0x406653
mov edx, dword [ebp - 0x468]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406649
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066bd
push ecx
push edx
call fcn.00416efb
add esp, 8
mov ecx, dword [ebp - 0x46c]
cmp ecx, 7
jbe 0x40668f
mov edx, dword [ebp - 0x480]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x406685
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066c5
push ecx
push edx
call fcn.00416efb
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00416aa2
mov esp, ebp
pop ebp
ret
call fcn.0041d357
call fcn.0041d357
call fcn.0041d357
call fcn.0041d357
nop dword [eax]
call fcn.0041d357
call fcn.0041d357
int3