Function at 0x140144f80
Capabilities:
Copy file
Delete file

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x6f8]
sub rsp, 0x7f8
mov rax, qword [0x14024fa28]
xor rax, rsp
mov qword [rbp + 0x6e0], rax
mov r12, r9
movzx r13d, r8b
mov r14, rdx
mov qword [rsp + 0x70], rcx
xor esi, esi
mov dword [rsp + 0x50], esi
movzx eax, r8b
xor al, 1
movzx edi, al
lea r15d, [rdi*2 + 1]
mov ebx, esi
mov qword [rsp + 0x58], rbx
mov ecx, 0x20008
call fcn.1401adb30
mov qword [rsp + 0x60], rax
test rax, rax
je 0x140145011
lea rdx, [rsp + 0x58]
mov rcx, rax
call fcn.1401acf20
mov ebx, eax
mov rcx, qword [rsp + 0x60]
call qword [case.0x1401b9e8b.6]
test ebx, ebx
mov rbx, qword [rsp + 0x58]
jne 0x14014504d
call qword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov rcx, rax
lea r8, [rsp + 0x60]
mov edx, 0x20008
call qword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x14014504d
lea rdx, [rsp + 0x58]
mov rcx, qword [rsp + 0x60]
call fcn.1401acf20
mov rcx, qword [rsp + 0x60]
call qword [case.0x1401b9e8b.6]
mov rbx, qword [rsp + 0x58]
mov qword [rsp + 0x48], rsi
mov esi, 0x104
mov qword [rsp + 0x40], rsi
lea rax, [rbp + 0x4d0]
mov qword [rsp + 0x38], rax
mov byte [rsp + 0x30], dil
mov qword [rsp + 0x28], r14
xor edi, edi
mov qword [rsp + 0x20], rdi
mov r9, rbx
mov r8d, r15d
lea rdx, [rbp - 0x20]
mov rcx, qword [rsp + 0x70]
call fcn.140142510
nop
mov rax, qword [rbp - 0x20]
mov rcx, qword [rax + 0x20]
test rcx, rcx
je 0x1401450b5
nop dword [rax + rax]
mov eax, dword [rcx]
and al, 0xf
cmp al, 2
je 0x140145172
mov rcx, qword [rcx + 0x30]
test rcx, rcx
jne 0x1401450a0
test rbx, rbx
je 0x1401450c3
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edi, select
xor r13d, r13d
mov rcx, qword [rbp - 0x18]
test rcx, rcx
je 0x1401450e5
mov rax, qword [0x14024fa58]
call qword [case.0x14003c8e9.0]
mov qword [rbp - 0x18], r13
mov rcx, qword [rbp - 0x20]
mov rbx, qword [rcx + 0x58]
test rbx, rbx
je 0x140145114
mov rcx, qword [rbx]
test rcx, rcx
je 0x140145107
mov rax, qword [0x14024fa58]
call qword [case.0x14003c8e9.0]
mov rbx, qword [rbx + 8]
test rbx, rbx
jne 0x1401450f2
mov rcx, qword [rbp - 0x20]
mov rax, qword [rcx]
shr rax, 8
sub rcx, rax
mov rcx, qword [rcx + 0x10]
test rcx, rcx
je 0x140145149
nop word [rax + rax]
mov rbx, qword [rcx + 0x10]
mov rax, qword [0x14024fa58]
call qword [case.0x14003c8e9.0]
mov rcx, rbx
test rbx, rbx
jne 0x140145130
mov qword [rbp - 0x20], r13
mov eax, edi
mov rcx, qword [rbp + 0x6e0]
xor rcx, rsp
call fcn.1401c5190
add rsp, 0x7f8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
test rbx, rbx
je 0x140145180
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rdx, rsi
lea rcx, [rbp + 0xb0]
call fcn.140195db0
mov r15d, 0x103
mov r14, 0xffffffffffffffff
test al, al
je 0x140145209
lea rax, [rbp + 0xb0]
mov rcx, r14
nop word [rax + rax]
inc rcx
cmp word [rax + rcx*2], 0
jne 0x1401451b0
lea rax, [rcx + 1]
cmp rax, rsi
jae 0x140145209
lea rax, [rcx + 0xe]
lea r8, [0x14020c310]
mov rdx, rsi
cmp rax, rsi
ja 0x1401451e5
lea rcx, [rbp + 0xb0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
jmp 0x140145209
lfence
mov r9, r15
sub r9, rcx
sub rdx, rcx
lea rax, [rbp + 0xb0]
lea rcx, [rax + rcx*2]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov word [rbp + 0x2b6], di
lea rax, [rbp + 0xb0]
mov rcx, r14
inc rcx
cmp word [rax + rcx*2], 0
jne 0x140145213
lea rax, [rcx + 1]
cmp rax, rsi
jae 0x14014526c
lea rax, [rcx + 4]
lea r8, [0x140203e70]
mov rdx, rsi
cmp rax, rsi
ja 0x140145248
lea rcx, [rbp + 0xb0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
jmp 0x14014526c
lfence
mov r9, r15
sub r9, rcx
sub rdx, rcx
lea rax, [rbp + 0xb0]
lea rcx, [rax + rcx*2]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov word [rbp + 0x2b6], di
lea rcx, [rbp + 0x4d0]
mov rax, r14
inc rax
cmp word [rcx + rax*2], 0
jne 0x140145276
lea rcx, [rbp + rax*2 + 0x4ce]
test rax, rax
je 0x1401452f5
nop dword [rax]
movzx edx, word [rcx]
cmp dx, 0x5c
je 0x1401452b0
cmp dx, 0x2f
je 0x1401452ab
sub rcx, 2
sub rax, 1
jne 0x140145290
jmp 0x1401452f5
test rax, rax
je 0x1401452f5
lea r8, [rcx + 2]
mov rax, r14
nop word [rax + rax]
inc rax
cmp word [r8 + rax*2], 0
jne 0x1401452c0
lfence
mov rdx, rsi
lea rcx, [rbp + 0x2c0]
cmp rax, rsi
jae 0x1401452e5
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
jmp 0x1401452f5
mov r9, r15
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov word [rbp + 0x4c6], di
mov rdx, rsi
lea rcx, [rbp + 0x2c0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
lea rbx, [rbp + rax*2 + 0x2be]
test rax, rax
je 0x140145333
dec rax
movzx ecx, word [rbx]
cmp cx, 0x2e
je 0x140145339
cmp cx, 0x5c
je 0x140145333
cmp cx, 0x2f
je 0x140145333
sub rbx, 2
test rax, rax
jne 0x140145312
cmp word [rbx], 0x2e
jne 0x140145382
lea rcx, [rbp + 0x2c0]
mov rax, rbx
sub rax, rcx
sar rax, 1
mov rdi, rsi
sub rdi, rax
je 0x140145380
lfence
lea r8, [0x1401f1ab8]
mov rdx, rdi
mov rcx, rbx
cmp rdi, 4
jbe 0x14014536f
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
jmp 0x140145380
lea r9, [rdi - 1]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
xor eax, eax
mov word [rbx + rdi*2 - 2], ax
xor edi, edi
lea rax, [rbp + 0xb0]
mov rcx, r14
nop dword [rax]
inc rcx
cmp word [rax + rcx*2], 0
jne 0x140145390
lea rax, [rbp + 0x2c0]
mov rdx, r14
inc rdx
cmp word [rax + rdx*2], 0
jne 0x1401453a4
lea rax, [rcx + 1]
cmp rax, rsi
jae 0x140145400
lea rax, [rcx + 1]
add rax, rdx
lea r8, [rbp + 0x2c0]
mov rdx, rsi
cmp rax, rsi
ja 0x1401453dc
lea rcx, [rbp + 0xb0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscat_s]
jmp 0x140145400
lfence
sub r15, rcx
sub rdx, rcx
lea rax, [rbp + 0xb0]
lea rcx, [rax + rcx*2]
mov r9, r15
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov word [rbp + 0x2b6], di
test r13b, r13b
jne 0x140145443
lea rax, [rbp + 0x4d0]
mov qword [rbp - 0x70], rax
xor r13d, r13d
mov qword [rbp - 0x78], r13
lea rax, [rbp - 0x78]
mov qword [rsp + 0x20], rax
lea r9d, [r13 + 9]
lea r8, [rbp + 0xb0]
lea rdx, [rbp - 0x70]
call fcn.14014c510
lea rcx, [rbp + 0x4d0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x14014545d
xor r8d, r8d
lea rdx, [rbp + 0xb0]
lea rcx, [rbp + 0x4d0]
call qword [sym.imp.KERNEL32.dll_CopyFileW]
xor r13d, r13d
test r12, r12
je 0x1401455de
mov r8, r12
cmp word [r12], 0
je 0x14014547c
add r8, 2
cmp word [r8], 0
jne 0x140145471
sub r8, r12
sar r8, 1
mov rdx, r12
lea rcx, [rbp - 0x48]
call fcn.14004b980
mov r15, rax
mov dword [rsp + 0x50], 1
cmp qword [rax + 0x18], 0x10
jb 0x1401454a3
mov r15, qword [rax]
mov rdi, qword [rbp - 0x20]
test rdi, rdi
je 0x140145584
mov rdi, qword [rdi + 0x20]
test rdi, rdi
je 0x140145584
mov rdx, qword [rdi + 8]
test rdx, rdx
je 0x1401454d6
lea rcx, str.SYSTEMSTATUS
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
je 0x1401454dc
mov rdi, qword [rdi + 0x30]
jmp 0x1401454b4
test rdi, rdi
je 0x140145584
mov eax, dword [rdi]
and eax, 0xf
cmp eax, 2
je 0x1401454f8
cmp eax, 7
jne 0x140145584
mov rax, qword [rdi]
shr rax, 8
mov rcx, rdi
sub rcx, rax
mov rcx, qword [rcx]
call fcn.14004ae10
mov rbx, rax
test rax, rax
je 0x140145584
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x140145530
mov rax, qword [rcx + 0x18]
mov qword [rax + 0x20], rbx
mov qword [rbx + 0x18], rax
mov qword [rcx + 0x18], rbx
jmp 0x140145538
mov qword [rdi + 0x38], rbx
mov qword [rax + 0x18], rbx
lea rcx, [rbx + 8]
mov qword [rsp + 0x20], 8
lea r9, str.USERDATA
mov r8d, 0x20
mov rdx, rbx
call fcn.140060ea0
nop word [rax + rax]
inc r14
cmp byte [r15 + r14], 0
jne 0x140145560
lea rcx, [rbx + 0x10]
mov qword [rsp + 0x20], r14
mov r9, r15
mov r8d, reloc.WS2_32.dll_recv
mov rdx, rbx
call fcn.140060ea0
mov eax, 1
and eax, 0xfffffffe
mov dword [rsp + 0x50], eax
mov rdx, qword [rbp - 0x30]
cmp rdx, 0x10
jb 0x1401455ce
inc rdx
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1401455c9
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1401455c9
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140007ea0
mov qword [rbp - 0x38], r13
mov qword [rbp - 0x30], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x48], 0
mov rdx, rsi
lea rcx, [rbp + 0xb0]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsnlen]
lea rbx, [rbp + rax*2 + 0xae]
test rax, rax
je 0x140145621
nop dword [rax + rax]
dec rax
movzx ecx, word [rbx]
cmp cx, 0x2e
je 0x140145627
cmp cx, 0x5c
je 0x140145621
cmp cx, 0x2f
je 0x140145621
sub rbx, 2
test rax, rax
jne 0x140145600
cmp word [rbx], 0x2e
jne 0x14014566a
lea rcx, [rbp + 0xb0]
mov rax, rbx
sub rax, rcx
sar rax, 1
sub rsi, rax
je 0x14014566a
lfence
lea r8, str..xml
mov rdx, rsi
mov rcx, rbx
cmp rsi, 4
jbe 0x14014565a
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcscpy_s]
jmp 0x14014566a
lea r9, [rsi - 1]
call qword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov word [rbx + rsi*2 - 2], r13w
lea rdx, [0x1401fa318]
lea rcx, [rbp + 0xb0]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen]
mov rbx, rax
mov qword [rbp - 0x58], rax
lea rax, [0x140055850]
mov qword [rbp - 0x50], rax
test rbx, rbx
je 0x1401456e0
lea rdi, vtable.pugi::xml_writer.0
mov qword [rsp + 0x78], rdi
lea rax, vtable.pugi::xml_writer_file.0
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rbx
mov dword [rsp + 0x20], r13d
mov r9d, 1
lea r8, reloc.WS2_32.dll_htons
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x20]
call fcn.1400567d0
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ferror]
nop
mov qword [rsp + 0x78], rdi
test rbx, rbx
je 0x1401456ee
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov rax, qword [rsp + 0x70]
mov rbx, qword [rax + 0x40]
mov rcx, qword [rbx + 0x460]
test rcx, rcx
je 0x140145724
mov rax, qword [rcx]
mov edx, reloc.WS2_32.dll_getservbyport
mov rax, qword [rax + 0x40]
call qword [case.0x14003c8e9.0]
test eax, eax
jne 0x140145724
lea edx, [rax + 4]
mov rcx, rbx
call fcn.1400c6560
mov edi, r13d
jmp 0x1401450cb