Function at 0x1400040b0
Capabilities:
Get common file path
Move file
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
push rbp
push r14
push r15
lea rbp, [rsp - 0x190]
sub rsp, 0x290
mov r14, r8
mov r15, rdx
mov rsi, rcx
test r9b, r9b
je 0x140004640
xor edx, edx
lea rcx, [rbp - 0x80]
mov r8d, 0x208
call fcn.1400a5760
mov edx, 0x104
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x1400046b0
movabs rax, 0xa5b89f0b6b8c1503
mov qword [rsp + 0x2b0], rdi
mov qword [rsp + 0x60], rax
xor ecx, ecx
movabs rax, 0x7c7a43d5f57f66fd
mov qword [rsp + 0x68], rax
movabs rax, 0x7f94d6a806b4fd82
mov qword [rsp + 0x70], rax
movabs rax, 0xe66fa662a0d8dcc4
mov qword [rsp + 0x78], rax
movabs rax, 0xd6a5629ffb6b5f15
mov qword [rsp + 0x40], rax
movabs rax, 0x4b7cb44310f59166
mov qword [rsp + 0x48], rax
movabs rax, 0xfd7fced6d106acfd
mov qword [rsp + 0x50], rax
movabs rax, 0x6fe662a6d8a0c4dc
mov qword [rsp + 0x58], rax
nop word [rax + rax]
movzx eax, word [rsp + rcx*2 + 0x40]
mov rdi, rcx
rol ax, 8
mov word [rsp + rcx*2 + 0x40], ax
and edi, 3
jne 0x14000422a
mov eax, dword [rsp + 0x42]
bswap eax
mov dword [rsp + 0x42], eax
movzx eax, word [rsp + rcx*2 + 0x42]
lea rdx, [rcx + 1]
rol ax, 8
mov word [rsp + rcx*2 + 0x42], ax
and edx, 3
jne 0x14000428e
mov eax, dword [rsp + 0x42]
bswap eax
mov dword [rsp + 0x42], eax
movzx eax, word [rsp + rcx*2 + 0x44]
lea r8, [rcx - 2]
rol ax, 8
mov word [rsp + rcx*2 + 0x44], ax
and r8d, 3
jne 0x1400042b9
mov eax, dword [rsp + 0x42]
bswap eax
mov dword [rsp + 0x42], eax
movzx eax, word [rsp + rcx*2 + 0x46]
lea r9, [rcx - 1]
rol ax, 8
mov word [rsp + rcx*2 + 0x46], ax
and r9d, 3
jne 0x1400042e5
mov eax, dword [rsp + 0x42]
bswap eax
mov dword [rsp + 0x42], eax
jmp 0x1400042f5
cmp rcx, 4
jne 0x1400041b4
mov eax, dword [rsp + 0x4a]
lea rdx, [rcx + 1]
bswap eax
mov dword [rsp + 0x4a], eax
lea r8, [rcx - 2]
movzx eax, word [rsp + rcx*2 + 0x42]
lea r9, [rcx - 1]
rol ax, 8
and edx, 3
mov word [rsp + rcx*2 + 0x42], ax
and r8d, 3
movzx eax, word [rsp + rcx*2 + 0x44]
and r9d, 3
rol ax, 8
mov word [rsp + rcx*2 + 0x44], ax
movzx eax, word [rsp + rcx*2 + 0x46]
rol ax, 8
mov word [rsp + rcx*2 + 0x46], ax
movzx eax, word [rsp + rcx*2 + 0x48]
rol ax, 8
mov word [rsp + rcx*2 + 0x48], ax
jmp 0x140004323
cmp rcx, 3
jne 0x1400041d9
mov eax, dword [rsp + 0x4a]
lea r8, [rcx - 2]
bswap eax
mov dword [rsp + 0x4a], eax
movzx eax, word [rsp + rcx*2 + 0x44]
rol ax, 8
mov word [rsp + rcx*2 + 0x44], ax
and r8d, ecx
jmp 0x1400042cd
cmp rcx, 2
jne 0x1400041ff
mov eax, dword [rsp + 0x4a]
bswap eax
mov dword [rsp + 0x4a], eax
movzx eax, word [rsp + rcx*2 + 0x46]
lea r9, [rcx - 1]
rol ax, 8
mov word [rsp + rcx*2 + 0x46], ax
and r9d, 3
jmp 0x1400042f5
cmp rcx, 1
jne 0x1400042f5
mov eax, dword [rsp + 0x4a]
bswap eax
mov dword [rsp + 0x4a], eax
movzx eax, word [rsp + rcx*2 + 0x48]
rol ax, 8
mov word [rsp + rcx*2 + 0x48], ax
test rdi, rdi
jne 0x140004314
mov eax, dword [rsp + 0x42]
bswap eax
mov dword [rsp + 0x42], eax
jmp 0x140004323
test rcx, rcx
jne 0x140004323
mov eax, dword [rsp + 0x4a]
bswap eax
mov dword [rsp + 0x4a], eax
movzx eax, word [rsp + rcx*2 + 0x4a]
rol ax, 8
mov word [rsp + rcx*2 + 0x4a], ax
test rdx, rdx
jne 0x140004342
mov eax, dword [rsp + 0x42]
bswap eax
mov dword [rsp + 0x42], eax
jmp 0x140004352
cmp rcx, 0xffffffffffffffff
jne 0x140004352
mov eax, dword [rsp + 0x4a]
bswap eax
mov dword [rsp + 0x4a], eax
movzx eax, word [rsp + rcx*2 + 0x4c]
rol ax, 8
mov word [rsp + rcx*2 + 0x4c], ax
test r8, r8
jne 0x140004371
mov eax, dword [rsp + 0x42]
bswap eax
mov dword [rsp + 0x42], eax
jmp 0x140004381
cmp rcx, 0xfffffffffffffffe
jne 0x140004381
mov eax, dword [rsp + 0x4a]
bswap eax
mov dword [rsp + 0x4a], eax
movzx eax, word [rsp + rcx*2 + 0x4e]
rol ax, 8
mov word [rsp + rcx*2 + 0x4e], ax
test r9, r9
jne 0x1400043a0
mov eax, dword [rsp + 0x42]
bswap eax
mov dword [rsp + 0x42], eax
jmp 0x1400043b0
cmp rcx, 0xfffffffffffffffd
jne 0x1400043b0
mov eax, dword [rsp + 0x4a]
bswap eax
mov dword [rsp + 0x4a], eax
add rcx, 8
cmp rcx, 8
jb 0x140004190
movdqa xmm0, xmmword [rsp + 0x40]
xor eax, eax
pxor xmm0, xmmword [rsp + 0x60]
movdqa xmmword [rsp + 0x40], xmm0
movzx ecx, word [rsp + rax*2 + 0x50]
mov rdi, rax
rol cx, 8
mov word [rsp + rax*2 + 0x50], cx
and edi, 3
jne 0x14000446c
mov ecx, dword [rsp + 0x52]
bswap ecx
mov dword [rsp + 0x52], ecx
movzx ecx, word [rsp + rax*2 + 0x52]
lea rdx, [rax + 1]
rol cx, 8
mov word [rsp + rax*2 + 0x52], cx
and edx, 3
jne 0x1400044d0
mov ecx, dword [rsp + 0x52]
bswap ecx
mov dword [rsp + 0x52], ecx
movzx ecx, word [rsp + rax*2 + 0x54]
lea r8, [rax - 2]
rol cx, 8
mov word [rsp + rax*2 + 0x54], cx
and r8d, 3
jne 0x1400044fb
mov ecx, dword [rsp + 0x52]
bswap ecx
mov dword [rsp + 0x52], ecx
movzx ecx, word [rsp + rax*2 + 0x56]
lea r9, [rax - 1]
rol cx, 8
mov word [rsp + rax*2 + 0x56], cx
and r9d, 3
jne 0x140004527
mov ecx, dword [rsp + 0x52]
bswap ecx
mov dword [rsp + 0x52], ecx
jmp 0x140004537
cmp rax, 4
jne 0x1400043f6
mov ecx, dword [rsp + 0x5a]
lea rdx, [rax + 1]
bswap ecx
mov dword [rsp + 0x5a], ecx
lea r8, [rax - 2]
movzx ecx, word [rsp + rax*2 + 0x52]
lea r9, [rax - 1]
rol cx, 8
and edx, 3
mov word [rsp + rax*2 + 0x52], cx
and r8d, 3
movzx ecx, word [rsp + rax*2 + 0x54]
and r9d, 3
rol cx, 8
mov word [rsp + rax*2 + 0x54], cx
movzx ecx, word [rsp + rax*2 + 0x56]
rol cx, 8
mov word [rsp + rax*2 + 0x56], cx
movzx ecx, word [rsp + rax*2 + 0x58]
rol cx, 8
mov word [rsp + rax*2 + 0x58], cx
jmp 0x140004565
cmp rax, 3
jne 0x14000441b
mov ecx, dword [rsp + 0x5a]
lea r8, [rax - 2]
bswap ecx
mov dword [rsp + 0x5a], ecx
movzx ecx, word [rsp + rax*2 + 0x54]
rol cx, 8
mov word [rsp + rax*2 + 0x54], cx
and r8d, eax
jmp 0x14000450f
cmp rax, 2
jne 0x140004441
mov ecx, dword [rsp + 0x5a]
bswap ecx
mov dword [rsp + 0x5a], ecx
movzx ecx, word [rsp + rax*2 + 0x56]
lea r9, [rax - 1]
rol cx, 8
mov word [rsp + rax*2 + 0x56], cx
and r9d, 3
jmp 0x140004537
cmp rax, 1
jne 0x140004537
mov ecx, dword [rsp + 0x5a]
bswap ecx
mov dword [rsp + 0x5a], ecx
movzx ecx, word [rsp + rax*2 + 0x58]
rol cx, 8
mov word [rsp + rax*2 + 0x58], cx
test rdi, rdi
jne 0x140004556
mov ecx, dword [rsp + 0x52]
bswap ecx
mov dword [rsp + 0x52], ecx
jmp 0x140004565
test rax, rax
jne 0x140004565
mov ecx, dword [rsp + 0x5a]
bswap ecx
mov dword [rsp + 0x5a], ecx
movzx ecx, word [rsp + rax*2 + 0x5a]
rol cx, 8
mov word [rsp + rax*2 + 0x5a], cx
test rdx, rdx
jne 0x140004584
mov ecx, dword [rsp + 0x52]
bswap ecx
mov dword [rsp + 0x52], ecx
jmp 0x140004594
cmp rax, 0xffffffffffffffff
jne 0x140004594
mov ecx, dword [rsp + 0x5a]
bswap ecx
mov dword [rsp + 0x5a], ecx
movzx ecx, word [rsp + rax*2 + 0x5c]
rol cx, 8
mov word [rsp + rax*2 + 0x5c], cx
test r8, r8
jne 0x1400045b3
mov ecx, dword [rsp + 0x52]
bswap ecx
mov dword [rsp + 0x52], ecx
jmp 0x1400045c3
cmp rax, 0xfffffffffffffffe
jne 0x1400045c3
mov ecx, dword [rsp + 0x5a]
bswap ecx
mov dword [rsp + 0x5a], ecx
movzx ecx, word [rsp + rax*2 + 0x5e]
rol cx, 8
mov word [rsp + rax*2 + 0x5e], cx
test r9, r9
jne 0x1400045e2
mov ecx, dword [rsp + 0x52]
bswap ecx
mov dword [rsp + 0x52], ecx
jmp 0x1400045f2
cmp rax, 0xfffffffffffffffd
jne 0x1400045f2
mov ecx, dword [rsp + 0x5a]
bswap ecx
mov dword [rsp + 0x5a], ecx
add rax, 8
cmp rax, 8
jb 0x1400043d2
movdqa xmm0, xmmword [rsp + 0x50]
lea r8, [rsp + 0x40]
pxor xmm0, xmmword [rsp + 0x70]
lea rcx, [rbp - 0x80]
mov edx, 0x104
movdqa xmmword [rsp + 0x50], xmm0
call fcn.1400a82f8
mov r8d, 0xb
lea rdx, [rbp - 0x80]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov rdi, qword [rsp + 0x2b0]
mov qword [rsp + 0x30], 0
xor r9d, r9d
mov dword [rsp + 0x28], pe_nt_image_headers64
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbx, rax
lea rcx, [rax - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x1400046b0
lea r9, [rbp + 0x1c8]
mov dword [rbp + 0x1c8], 0
mov r8d, r14d
mov qword [rsp + 0x20], 0
mov rdx, r15
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rbx
test eax, eax
jne 0x1400046cb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
lea r11, [rsp + 0x290]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
jmp 0x1400046b2