Function at 0x401170
Capabilities:
Copy file
Create process on windows
Move file

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4028a6
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x390
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x220]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x4015f3
xorps xmm0, xmm0
mov dword [ebp - 0x228], 0
lea ecx, [ebp - 0x220]
mov dword [ebp - 0x224], 0
movups xmmword [ebp - 0x238], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4011f4
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x238]
call fcn.00401a20
mov dword [ebp - 4], 0
lea esi, [ebp - 0x238]
cmp dword [ebp - 0x224], 7
mov edi, dword [ebp - 0x228]
cmova esi, dword [ebp - 0x238]
mov dword [ebp - 0x384], esi
test edi, edi
je 0x401313
push 0x100
lea eax, [ebp - 0x380]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, 0x4031e8
mov edx, 0x100
movzx eax, word [ecx]
cmp ax, dx
jae 0x4012b2
movzx eax, al
add ecx, 2
mov byte [ebp + eax - 0x380], 1
cmp ecx, 0x4031ea
jne 0x401265
or ecx, 0xffffffff
lea eax, [edi - 1]
cmp eax, ecx
cmovb ecx, eax
lea ecx, [esi + ecx*2]
movzx eax, word [ecx]
cmp ax, dx
jae 0x4012a3
cmp byte [ebp + eax - 0x380], 0
jne 0x4012ac
cmp ecx, esi
je 0x401313
sub ecx, 2
jmp 0x401291
sub ecx, esi
sar ecx, 1
jmp 0x401316
or ecx, 0xffffffff
lea eax, [edi - 1]
cmp eax, ecx
cmovb ecx, eax
lea ecx, [esi + ecx*2]
movzx edi, word [ecx]
mov eax, 0x5c
mov edx, 0x4031e8
lea esi, [eax - 0x5b]
cmp ax, di
je 0x401303
cmp esi, 1
je 0x4012eb
movzx eax, word [edx + 2]
add edx, 2
dec esi
cmp ax, di
jne 0x4012d5
test edx, edx
jne 0x401303
cmp ecx, dword [ebp - 0x384]
je 0x4012f8
sub ecx, 2
jmp 0x4012c0
mov edi, dword [ebp - 0x228]
or ecx, 0xffffffff
jmp 0x401316
sub ecx, dword [ebp - 0x384]
mov edi, dword [ebp - 0x228]
sar ecx, 1
jmp 0x401316
or ecx, 0xffffffff
inc ecx
mov dword [ebp - 0x38c], 0
cmp edi, ecx
mov dword [ebp - 0x388], 0
lea eax, [ebp - 0x238]
xorps xmm0, xmm0
cmovb ecx, edi
cmp dword [ebp - 0x224], 7
push ecx
cmova eax, dword [ebp - 0x238]
lea ecx, [ebp - 0x39c]
push eax
movups xmmword [ebp - 0x39c], xmm0
call fcn.00401a20
mov ecx, dword [ebp - 0x224]
cmp ecx, 7
jbe 0x40139b
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401391
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4015e3
push ecx
push edx
call fcn.00401b5b
add esp, 8
movups xmm0, xmmword [ebp - 0x39c]
push 0x4031ec
lea edx, [ebp - 0x238]
movups xmmword [ebp - 0x238], xmm0
lea ecx, [ebp - 0x280]
movq xmm0, qword [ebp - 0x38c]
movq qword [ebp - 0x228], xmm0
call fcn.004018d0
add esp, 4
push 0x4031f4
lea edx, [ebp - 0x238]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x250]
call fcn.004018d0
add esp, 4
push 0x4031ec
lea edx, [ebp - 0x238]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x268]
call fcn.004018d0
add esp, 4
lea ecx, [ebp - 0x250]
cmp dword [ebp - 0x23c], 7
lea eax, [ebp - 0x280]
cmova ecx, dword [ebp - 0x250]
cmp dword [ebp - 0x26c], 7
push ecx
cmova eax, dword [ebp - 0x280]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
je 0x40149e
cmp dword [ebp - 0x254], 7
lea ecx, [ebp - 0x268]
push 0
cmova ecx, dword [ebp - 0x268]
lea eax, [ebp - 0x250]
cmp dword [ebp - 0x23c], 7
push ecx
cmova eax, dword [ebp - 0x250]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x40149e
cmp dword [ebp - 0x23c], 7
lea eax, [ebp - 0x250]
push 1
cmova eax, dword [ebp - 0x250]
push 0
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, dword [ebp - 0x254]
cmp ecx, 7
jbe 0x4014de
mov edx, dword [ebp - 0x268]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4014d4
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4015e3
push ecx
push edx
call fcn.00401b5b
add esp, 8
mov ecx, dword [ebp - 0x23c]
xor eax, eax
mov dword [ebp - 0x258], 0
mov dword [ebp - 0x254], 7
mov word [ebp - 0x268], ax
cmp ecx, 7
jbe 0x40153b
mov edx, dword [ebp - 0x250]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401531
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4015e3
push ecx
push edx
call fcn.00401b5b
add esp, 8
mov ecx, dword [ebp - 0x26c]
xor eax, eax
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 7
mov word [ebp - 0x250], ax
cmp ecx, 7
jbe 0x401594
mov edx, dword [ebp - 0x280]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40158a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4015e3
push ecx
push edx
call fcn.00401b5b
add esp, 8
mov ecx, dword [ebp - 0x224]
xor eax, eax
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 7
mov word [ebp - 0x280], ax
cmp ecx, 7
jbe 0x4015f3
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4015e9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4015e9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00401b5b
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00401b18
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret