Function at 0x140055a80
Capabilities:
Accept command line arguments
Query environment variable

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rdi
push rsi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
xor r8d, r8d
mov rsi, rcx
mov rdi, rdx
lea rcx, [0x1400999d0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
jne 0x140055ac8
lea rsp, [rbp + 8]
pop rbx
pop rsi
pop rdi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
mov dword [0x1400a1660], 0
mov edx, dword [0x1400a1650]
mov qword [0x1400a1658], 0
test edx, edx
jle 0x140055af5
mov qword [0], 0
ud2
mov eax, edx
neg eax
and eax, 0xffffffc0
lea eax, [rdx + rax + 0x40]
mov dword [0x1400a1650], eax
cdqe
lea rcx, [rax*8]
call sub.msvcrt.dll_malloc
test rax, rax
je 0x140055ab1
mov qword [0x1400a1658], rax
mov qword [rax], 0
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov r12, rax
test rax, rax
je 0x140055ab1
mov rcx, rax
call sub.msvcrt.dll_wcslen
add eax, 1
cdqe
lea rax, [rax + rax + 0xf]
and rax, 0xfffffffffffffff0
call fcn.1400598c0
sub rsp, rax
mov rdx, r12
lea rbx, [rsp + 0x40]
mov rcx, rbx
call sub.msvcrt.dll_wcscpy
movzx edx, word [rbx]
test dx, dx
je 0x140055c43
cmp dx, 0x20
je 0x140055c80
cmp dx, 9
je 0x140055c80
nop dword [rax + rax]
movq xmm1, qword [str._]
mov r13, rbx
mov rcx, rbx
xor r10d, r10d
movdqu xmm0, xmmword [str._]
jmp 0x140055be8
cmp dx, 0x20
je 0x140055c15
cmp dx, 9
je 0x140055c15
cmp dx, 0x22
je 0x140055d88
xor r10d, r10d
cmp dx, 0x5c
je 0x140055ca0
mov word [rcx], dx
add r13, 2
movzx edx, word [r13]
add rcx, 2
test dx, dx
je 0x140055c15
test r10d, r10d
je 0x140055bb0
cmp dx, 0x22
jne 0x140055bc9
movzx edx, word [r13 + 2]
mov r10d, 1
cmp dx, 0x22
je 0x140056030
xor r10d, 1
add r13, 2
test dx, dx
jne 0x140055be8
sub rcx, rbx
sar rcx, 1
mov r12, rcx
mov edx, ecx
test ecx, ecx
je 0x140055e90
mov rcx, rbx
call fcn.140055790
test eax, eax
je 0x140055e90
mov rbx, r13
movzx edx, word [rbx]
test dx, dx
jne 0x140055c8d
call qword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov ecx, 0xfde9
mov dword [0x1400a1664], eax
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov eax, dword [0x1400a1660]
lea rcx, [0x140055740]
mov dword [rsi], eax
mov rax, qword [0x1400a1658]
mov qword [rdi], rax
call fcn.1400014f0
jmp 0x140055ab1
movzx edx, word [rbx + 2]
add rbx, 2
test dx, dx
je 0x140055c43
cmp dx, 9
je 0x140055c80
cmp dx, 0x20
jne 0x140055b90
jmp 0x140055c80
mov rax, r13
nop dword [rax + rax]
mov r9, rax
movzx edx, word [rax + 2]
add rax, 2
cmp dx, 0x5c
je 0x140055ca8
mov r12, rax
sub r12, r13
mov r8, r12
sar r8, 1
cmp dx, 0x22
je 0x140055d98
test r8d, r8d
jle 0x140056065
cmp r8d, 7
jle 0x14005604b
mov r9d, r8d
mov rdx, rcx
shr r9d, 3
shl r9, 4
add r9, rcx
nop dword [rax + rax]
movups xmmword [rdx], xmm0
add rdx, 0x10
cmp r9, rdx
jne 0x140055cf8
mov edx, r8d
mov r12d, r8d
and edx, 0xfffffff8
mov r9d, edx
sub r12d, edx
lea r11, [rcx + r9*2]
test r8b, 7
je 0x140055d71
mov r9d, r8d
sub r9d, edx
lea r13d, [r9 - 1]
cmp r13d, 2
jbe 0x140055d46
movq qword [rcx + rdx*2], xmm1
test r9b, 3
je 0x140055d71
and r9d, 0xfffffffc
mov edx, r9d
sub r12d, r9d
lea r11, [r11 + rdx*2]
mov r13d, 0x5c
mov word [r11], r13w
cmp r12d, 1
je 0x140055d71
mov r9d, 0x5c
mov word [r11 + 2], r9w
cmp r12d, 2
je 0x140055d71
mov edx, 0x5c
mov word [r11 + 4], dx
movsxd r8, r8d
movzx edx, word [rax]
mov r13, rax
lea rcx, [rcx + r8*2]
jmp 0x140055be3
movzx edx, word [r13 + 2]
xor r10d, r10d
jmp 0x140055c08
mov r11, r8
shr r12, 0x3f
shr r11, 0x3f
add r11, r8
add r8, r12
and r8d, 1
sar r11, 1
sub r8, r12
test r11d, r11d
jle 0x14005606d
cmp r11d, 7
jle 0x140056058
mov r12d, r11d
mov rdx, rcx
shr r12d, 3
shl r12, 4
add r12, rcx
nop word [rax + rax]
movups xmmword [rdx], xmm0
add rdx, 0x10
cmp r12, rdx
jne 0x140055de0
mov edx, r11d
mov r13d, r11d
and edx, 0xfffffff8
mov r12d, edx
sub r13d, edx
lea r12, [rcx + r12*2]
test r11b, 7
je 0x140055e5e
mov r14d, r11d
sub r14d, edx
lea r15d, [r14 - 1]
cmp r15d, 2
jbe 0x140055e30
movq qword [rcx + rdx*2], xmm1
mov edx, r14d
and edx, 0xfffffffc
mov r15d, edx
sub r13d, edx
and r14d, 3
lea r12, [r12 + r15*2]
je 0x140055e5e
mov edx, 0x5c
mov word [r12], dx
cmp r13d, 1
je 0x140055e5e
mov r15d, 0x5c
mov word [r12 + 2], r15w
cmp r13d, 2
je 0x140055e5e
mov r14d, 0x5c
mov word [r12 + 4], r14w
movsxd r11, r11d
movzx edx, word [r9 + 2]
mov r13, rax
lea rcx, [rcx + r11*2]
cmp r8, 1
jne 0x140055be3
mov word [rcx], dx
lea r13, [r9 + 4]
movzx edx, word [rax + 2]
add rcx, 2
jmp 0x140055be3
movsxd r15, dword [0x1400a1660]
mov edx, dword [0x1400a1650]
mov rcx, qword [0x1400a1658]
lea r14d, [r15 + 1]
cmp r14d, edx
jge 0x140055f80
movsxd rax, r14d
mov qword [rcx + rax*8], 0
test r12d, r12d
jle 0x140055fbe
mov dword [rsp + 0x28], 0
mov r9d, r12d
mov r8, rbx
xor edx, edx
mov qword [rsp + 0x38], 0
mov r14, qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, 0xfde9
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], 0
call r14
mov r15d, eax
test eax, eax
jle 0x140055c38
lea ecx, [rax + 1]
movsxd rcx, ecx
call sub.msvcrt.dll_malloc
test rax, rax
je 0x140055fd0
mov dword [rsp + 0x28], r15d
mov r9d, r12d
mov r8, rbx
xor edx, edx
mov qword [rsp + 0x38], 0
mov ecx, 0xfde9
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x20], rax
mov qword [rbp - 8], rax
call r14
movsxd rax, r15d
mov r10, qword [rbp - 8]
movsxd r15, dword [0x1400a1660]
add rax, r10
lea r14d, [r15 + 1]
mov byte [rax], 0
mov rax, qword [0x1400a1658]
mov dword [0x1400a1660], r14d
mov qword [rax + r15*8], r10
jmp 0x140055c38
mov eax, r14d
sub eax, edx
and eax, 0xffffffc0
lea edx, [rdx + rax + 0x40]
mov dword [0x1400a1650], edx
movsxd rdx, edx
shl rdx, 3
call sub.msvcrt.dll_realloc
test rax, rax
je 0x140055fd0
movsxd rdx, r14d
mov qword [0x1400a1658], rax
mov qword [rax + rdx*8], 0
test r12d, r12d
jg 0x140055ec5
mov ecx, 1
call sub.msvcrt.dll_malloc
mov r10, rax
test rax, rax
jne 0x140055f63
mov rdi, qword [0x1400a1658]
test rdi, rdi
je 0x140055ab1
movsxd rax, dword [0x1400a1660]
mov rbx, rdi
lea rsi, [rdi + rax*8]
test eax, eax
jle 0x140056009
nop word [rax + rax]
mov rcx, qword [rbx]
add rbx, 8
call sub.msvcrt.dll_free
cmp rsi, rbx
jne 0x140055ff8
mov rcx, rdi
call sub.msvcrt.dll_free
mov dword [0x1400a1660], 0
mov qword [0x1400a1658], 0
jmp 0x140055ab1
mov eax, 0x22
add r13, 2
add rcx, 2
mov word [rcx - 2], ax
movzx edx, word [r13 + 2]
jmp 0x140055c0c
mov r12d, r8d
mov r11, rcx
xor edx, edx
jmp 0x140055d1d
mov r13d, r11d
mov r12, rcx
xor edx, edx
jmp 0x140055e05
mov r13, rax
jmp 0x140055be3
sub r8, 1
je 0x140055e77
mov r13, rax
test r10d, r10d
jne 0x140055bf3
jmp 0x140055bb0