Function at 0x401236
Capabilities:
Check if file exists
Copy file
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
push edi
xor edi, edi
push edi
push 0x11
mov dword [ebp - 0x34], edi
call fcn.00406347
push 0x10
mov dword [ebp - 0x28], eax
call fcn.00403bb3
add esp, 0xc
push 0x12
mov dword [ebp - 0x2c], eax
call fcn.00403bb3
pop ecx
push 0x43
mov dword [ebp - 0x30], eax
call fcn.00403bb3
pop ecx
mov esi, 0x20a
push esi
mov dword [ebp - 0x18], eax
call fcn.00409041
pop ecx
push esi
mov dword [ebp - 0x1c], eax
call fcn.00409041
pop ecx
push esi
mov dword [ebp - 4], eax
call fcn.00409041
pop ecx
push esi
mov dword [ebp - 8], eax
call fcn.00409041
pop ecx
push esi
mov ebx, eax
call fcn.00409041
pop ecx
push esi
mov dword [ebp - 0xc], eax
call fcn.00409041
pop ecx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], edi
cmp ebx, edi
je 0x401507
cmp dword [ebp - 4], edi
je 0x401507
push dword [ebp - 4]
call fcn.00405b0e
pop ecx
test eax, eax
je 0x401507
cmp dword [ebp - 8], edi
je 0x401507
cmp dword [ebp - 0x1c], edi
je 0x401507
push dword [ebp - 0x1c]
call fcn.00405b20
pop ecx
test eax, eax
je 0x401507
push dword [ebp - 0x18]
mov edi, 0x40a208
push edi
push dword [ebp - 0x1c]
mov esi, 0x104
push 3
push esi
push dword [ebp - 8]
call fcn.004059f1
add esp, 0x18
test eax, eax
je 0x401507
cmp dword [ebp - 0xc], 0
je 0x401507
push 0
push dword [ebp - 0xc]
call fcn.00405b7c
pop ecx
pop ecx
test eax, eax
je 0x401507
cmp dword [ebp - 0x10], 0
je 0x401507
push 1
push dword [ebp - 0x10]
call fcn.00405b7c
pop ecx
pop ecx
test eax, eax
je 0x401507
push dword [ebp - 0x10]
push edi
push dword [ebp - 0x2c]
push 3
push esi
push ebx
call fcn.004059f1
add esp, 0x18
test eax, eax
je 0x401507
push 0
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x401461
push ebx
call fcn.004090c6
pop ecx
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x34]
push eax
push 0x20106
push 0
push dword [ebp - 0x28]
push getpeername
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4013ce
mov eax, dword [ebp - 0x24]
push ebx
push dword [ebp - 0xc]
lea edi, [ebp - 0x34]
call fcn.00403a93
pop ecx
pop ecx
mov dword [ebp - 0x24], eax
mov edi, 0x40a208
jmp 0x4013d2
and dword [ebp - 0x24], 0
push ebx
call fcn.004090c6
pop ecx
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x20]
push eax
push 0x20106
push 0
push dword [ebp - 0x28]
push getpeername
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401411
mov eax, dword [ebp - 0x38]
push ebx
push dword [ebp - 0xc]
lea edi, [ebp - 0x20]
call fcn.00403a93
pop ecx
pop ecx
mov edi, 0x40a208
jmp 0x401413
xor eax, eax
push dword [ebp - 0x18]
xor ecx, ecx
test eax, eax
setg cl
xor eax, eax
cmp dword [ebp - 0x24], eax
push edi
push dword [ebp - 0x2c]
setg al
push 3
push esi
push ebx
or ecx, eax
mov dword [ebp - 0x34], ecx
call fcn.004059f1
add esp, 0x18
test eax, eax
je 0x401461
push 1
push ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x401461
or eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebp - 0x30], 0
je 0x401507
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x30]
call fcn.004035d2
mov eax, dword [ebp - 0x14]
pop ecx
test eax, eax
je 0x401507
and dword [ebp - 0x20], 0
push 0
jmp 0x4014f1
push dword [ebp - 0x10]
push edi
push dword [ebp - 0x24]
push 3
push esi
push ebx
call fcn.004059f1
add esp, 0x18
test eax, eax
je 0x4014e8
push 1
push ebx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push dword [ebp - 0x18]
push edi
push dword [ebp - 0x24]
push 3
push esi
push ebx
call fcn.004059f1
add esp, 0x18
test eax, eax
je 0x4014e8
push 1
push ebx
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4014e8
or eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
inc dword [ebp - 0x20]
push dword [ebp - 0x20]
mov eax, dword [ebp - 0x14]
call fcn.004035a4
mov dword [ebp - 0x24], eax
pop ecx
test eax, eax
jne 0x40148b
push dword [ebp - 0x14]
call fcn.004090a1
pop ecx
push dword [ebp - 0x18]
call fcn.004039da
pop ecx
push dword [ebp - 0x1c]
call fcn.004039da
pop ecx
push dword [ebp - 4]
call fcn.004039da
pop ecx
push dword [ebp - 8]
call fcn.004039da
pop ecx
push ebx
call fcn.004039da
pop ecx
push dword [ebp - 0xc]
call fcn.004039da
pop ecx
push dword [ebp - 0x10]
call fcn.004039da
pop ecx
push dword [ebp - 0x28]
call fcn.004039da
pop ecx
push dword [ebp - 0x2c]
call fcn.004039da
pop ecx
push dword [ebp - 0x30]
call fcn.004039da
mov eax, dword [ebp - 0x34]
pop ecx
pop edi
pop esi
pop ebx
leave
ret