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 0x402896
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
jne 0x4011e1
push 0x10
push str.Error
push str.Failed_to_get_executable_path.
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x401647
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]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401210
sub ecx, edx
lea eax, [ebp - 0x220]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x238]
call fcn.00401a10
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 0x401332
push 0x100
lea eax, [ebp - 0x380]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, 0x40322c
mov edx, 0x100
movzx eax, word [ecx]
cmp ax, dx
jae 0x4012d1
movzx eax, al
add ecx, 2
mov byte [ebp + eax - 0x380], 1
cmp ecx, 0x40322e
jne 0x401281
or ecx, 0xffffffff
lea eax, [edi - 1]
cmp eax, ecx
cmovb ecx, eax
lea ecx, [esi + ecx*2]
nop dword [eax]
movzx eax, word [ecx]
cmp ax, dx
jae 0x4012c2
cmp byte [ebp + eax - 0x380], 0
jne 0x4012cb
cmp ecx, esi
je 0x401332
sub ecx, 2
jmp 0x4012b0
sub ecx, esi
sar ecx, 1
jmp 0x401335
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, 0x40322c
lea esi, [eax - 0x5b]
cmp ax, di
je 0x401322
cmp esi, 1
je 0x40130a
movzx eax, word [edx + 2]
add edx, 2
dec esi
cmp ax, di
jne 0x4012f4
test edx, edx
jne 0x401322
cmp ecx, dword [ebp - 0x384]
je 0x401317
sub ecx, 2
jmp 0x4012df
mov edi, dword [ebp - 0x228]
or ecx, 0xffffffff
jmp 0x401335
sub ecx, dword [ebp - 0x384]
mov edi, dword [ebp - 0x228]
sar ecx, 1
jmp 0x401335
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.00401a10
mov ecx, dword [ebp - 0x224]
cmp ecx, 7
jbe 0x4013ba
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4013b0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401637
push ecx
push edx
call fcn.00401b4b
add esp, 8
movups xmm0, xmmword [ebp - 0x39c]
push 0x403230
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.004018c0
add esp, 4
push 0x403238
lea edx, [ebp - 0x238]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x250]
call fcn.004018c0
add esp, 4
push 0x403230
lea edx, [ebp - 0x238]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x268]
call fcn.004018c0
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
jne 0x40146d
push 0x10
push str.Error
push str.Failed_to_rename_the_file.
jmp 0x4014ea
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
jne 0x4014b1
push 0x10
push str.Error
push str.Failed_to_copy_the_file.
jmp 0x4014ea
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]
cmp eax, 0x20
ja 0x4014f2
push 0x10
push str.Error
push str.Failed_to_execute_the_file.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
mov ecx, dword [ebp - 0x254]
cmp ecx, 7
jbe 0x401532
mov edx, dword [ebp - 0x268]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401528
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401637
push ecx
push edx
call fcn.00401b4b
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 0x40158f
mov edx, dword [ebp - 0x250]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x401585
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401637
push ecx
push edx
call fcn.00401b4b
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 0x4015e8
mov edx, dword [ebp - 0x280]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x4015de
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401637
push ecx
push edx
call fcn.00401b4b
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 0x401647
mov edx, dword [ebp - 0x238]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x40163d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40163d
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00401b4b
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.00401b08
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret