Function at 0x140022568
Capabilities:
Terminate process

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rbp
push rsi
push rdi
push r13
push r14
push r15
sub rsp, 0x40
mov rsi, rdx
mov rdi, rcx
test rcx, rcx
je 0x1400228e1
test rdx, rdx
je 0x1400228e1
call fcn.1400220f8
mov r13d, 1
cmp eax, r13d
jne 0x140022707
mov ecx, r13d
call fcn.140002378
lea r15d, [r13 + 1]
cmp rdi, rax
jne 0x1400225c2
mov ecx, 0xfffffff5
jmp 0x1400225d8
mov ecx, r15d
call fcn.140002378
cmp rdi, rax
jne 0x1400226e9
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
nop dword [rax + rax]
and dword [rsp + 0x70], 0
mov rcx, rsi
mov r14, rax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
nop dword [rax + rax]
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x70]
mov r8d, eax
mov rdx, rsi
mov rcx, r14
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
nop dword [rax + rax]
test eax, eax
je 0x140022627
cmp ebx, dword [rsp + 0x70]
je 0x140022697
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 8
jne 0x1400226c4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
nop dword [rax + rax]
xor ebx, ebx
mov ebp, eax
test eax, eax
je 0x140022697
mov eax, 0x400
mov edi, ebp
lea rdx, [rsi + rbx*2]
sub edi, ebx
lea r9, [rsp + 0x70]
cmp edi, eax
mov rcx, r14
cmova edi, eax
and qword [rsp + 0x20], 0
mov r8d, edi
call qword [sym.imp.KERNEL32.dll_WriteConsoleW]
nop dword [rax + rax]
test eax, eax
je 0x14002269f
cmp edi, dword [rsp + 0x70]
jne 0x14002269f
mov eax, 0x400
add ebx, eax
cmp ebx, ebp
jb 0x140022658
mov eax, r13d
jmp 0x140022902
mov ecx, r15d
call fcn.140002378
mov rcx, rax
call fcn.1400224f8
call fcn.140022258
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, r15d
call fcn.140002378
mov rcx, rax
call fcn.1400224f8
call fcn.140022258
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_ExitProcess]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x140022900
mov ecx, 0x42b
jmp 0x1400228f4
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
nop dword [rax + rax]
xor edx, edx
lea rcx, [0x14002db40]
mov r8d, 0x100
mov r14d, eax
call sub.msvcrt.dll_memset
xor ebp, ebp
test r14d, r14d
je 0x140022697
mov eax, 0xff
lea r15, [rsi + rbp*2]
mov ebx, r14d
sub ebx, ebp
cmp ebx, eax
cmova ebx, eax
call qword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
nop dword [rax + rax]
and qword [rsp + 0x38], 0
mov r9d, ebx
and qword [rsp + 0x30], 0
mov ecx, eax
and dword [rsp + 0x28], 0
mov r8, r15
and qword [rsp + 0x20], 0
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
nop dword [rax + rax]
mov dword [rsp + 0x70], eax
test eax, eax
je 0x1400228bc
cmp eax, 0xff
jbe 0x1400227f8
add eax, 0xffffff01
cmp eax, 3
jbe 0x1400227a7
shr eax, 1
sub ebx, eax
jmp 0x1400227a9
dec ebx
and dword [rsp + 0x70], 0
test ebx, ebx
jne 0x14002274b
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x1400227d3
mov ecx, 0x42b
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov ecx, r13d
call fcn.140002378
mov rcx, rax
call fcn.1400224f8
call fcn.140022258
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_ExitProcess]
cmp eax, ebx
lea rcx, [0x14002db40]
mov r8d, 0x100
cmovb ebx, eax
xor edx, edx
call sub.msvcrt.dll_memset
call qword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
nop dword [rax + rax]
and qword [rsp + 0x38], 0
mov r9d, ebx
and qword [rsp + 0x30], 0
mov ecx, eax
lea rax, [0x14002db40]
mov dword [rsp + 0x28], 0xff
mov r8, r15
mov qword [rsp + 0x20], rax
xor edx, edx
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
nop dword [rax + rax]
mov dword [rsp + 0x70], eax
test eax, eax
je 0x140022897
lea r8, [0x14002db40]
mov rcx, rdi
lea rdx, [0x1400270b0]
add ebp, ebx
call qword [sym.imp.msvcrt.dll_fprintf]
nop dword [rax + rax]
mov rcx, rdi
call qword [sym.imp.msvcrt.dll_fflush]
nop dword [rax + rax]
cmp r14d, ebp
jbe 0x140022697
jmp 0x140022738
mov ecx, r13d
call fcn.140002378
mov rcx, rax
call fcn.1400224f8
call fcn.140022258
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, r13d
call fcn.140002378
mov rcx, rax
call fcn.1400224f8
call fcn.140022258
mov ecx, r13d
call qword [sym.imp.KERNEL32.dll_ExitProcess]
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
test eax, eax
jne 0x140022900
lea ecx, [rax + 0x57]
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
xor eax, eax
lea r11, [rsp + 0x40]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop rdi
pop rsi
ret