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

Disassembly:
push rbp
push r12
push r13
push r14
push r15
mov eax, 0x60
call fcn.1400473e0
sub rsp, rax
lea rbp, [rsp + 0x40]
mov qword [rbp + 0x50], rbx
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], rdi
mov rax, qword [0x1400826b8]
xor rax, rbp
mov qword [rbp + 0x10], rax
mov r13, rdx
mov qword [rbp], rdx
mov qword [rbp + 8], rcx
xor edx, edx
lea rcx, str.OPENSSL_WIN32_UTF8
xor r8d, r8d
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x140041bad
xor r15d, r15d
xor ecx, ecx
mov dword [0x140083be4], r15d
mov qword [0x140083be8], r15
call fcn.1400417f0
test eax, eax
je 0x140041bad
call qword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov rdx, rax
test rax, rax
je 0x140041bad
mov rax, 0xffffffffffffffff
inc rax
cmp word [rdx + rax*2], r15w
jne 0x140041914
inc eax
movsxd rcx, eax
add rcx, rcx
lea rax, [rcx + 0xf]
cmp rax, rcx
ja 0x140041939
movabs rax, 0xffffffffffffff0
and rax, 0xfffffffffffffff0
call fcn.1400473e0
sub rsp, rax
lea rbx, [rsp + 0x40]
mov rcx, rbx
sub rcx, rdx
movzx eax, word [rdx]
mov word [rcx + rdx], ax
lea rdx, [rdx + 2]
test ax, ax
jne 0x140041950
movzx eax, word [rbx]
test ax, ax
je 0x140041b73
movzx ecx, ax
nop
mov r9d, r15d
cmp cx, 0x20
je 0x140041b60
cmp cx, 9
je 0x140041b60
mov rsi, rbx
mov r12, rbx
test cx, cx
je 0x140041a92
mov r13d, 0x5c
nop dword [rax]
test r9d, r9d
jne 0x1400419b9
cmp ax, 0x20
je 0x140041a8e
cmp ax, 9
je 0x140041a8e
cmp ax, 0x22
je 0x140041a59
cmp ax, r13w
je 0x1400419d5
mov word [rsi], ax
add rsi, 2
jmp 0x140041a7e
mov rcx, rbx
nop dword [rax + rax]
movzx eax, word [rbx + 2]
add rbx, 2
cmp ax, r13w
je 0x1400419e0
mov r8, rbx
sub r8, rcx
sar r8, 1
cmp ax, 0x22
jne 0x140041a3e
mov rax, r8
cqo
sub rax, rdx
sar rax, 1
test eax, eax
jle 0x140041a1e
mov edx, eax
mov rdi, rsi
movzx eax, r13w
mov ecx, edx
rep stosw word [rdi], ax
lea rsi, [rsi + rdx*2]
mov rax, r8
cqo
and eax, 1
xor rax, rdx
sub rax, rdx
cmp rax, 1
jne 0x140041a82
movzx eax, word [rbx]
mov word [rsi], ax
add rsi, 2
jmp 0x140041a7e
test r8d, r8d
jle 0x140041a82
mov rdi, rsi
mov edx, r8d
movzx eax, r13w
mov ecx, r8d
rep stosw word [rdi], ax
lea rsi, [rsi + rdx*2]
jmp 0x140041a82
test r9d, r9d
je 0x140041a72
cmp word [rbx + 2], 0x22
jne 0x140041a72
mov word [rsi], ax
add rsi, 2
add rbx, 2
jmp 0x140041a7e
test r9d, r9d
mov eax, r15d
sete al
mov r9d, eax
add rbx, 2
movzx eax, word [rbx]
test ax, ax
jne 0x1400419a0
mov r13, qword [rbp]
sub rsi, r12
sar rsi, 1
test esi, esi
je 0x140041aae
mov edx, esi
mov rcx, r12
call fcn.140041540
test eax, eax
jne 0x140041b64
mov ecx, dword [0x140083be4]
inc ecx
call fcn.1400417f0
test eax, eax
je 0x140041bd6
mov r14d, r15d
test esi, esi
jle 0x140041af8
mov qword [rsp + 0x38], r15
mov r9d, esi
mov qword [rsp + 0x30], r15
mov r8, r12
mov dword [rsp + 0x28], r15d
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov r14d, eax
test eax, eax
jle 0x140041b64
movsxd r15, r14d
lea rcx, [r15 + 1]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
test rax, rax
je 0x140041bd3
test esi, esi
jle 0x140041b3e
xor eax, eax
mov r9d, esi
mov qword [rsp + 0x38], rax
mov r8, r12
mov qword [rsp + 0x30], rax
xor edx, edx
mov dword [rsp + 0x28], r14d
mov ecx, 0xfde9
mov qword [rsp + 0x20], rdi
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd rcx, dword [0x140083be4]
mov rax, qword [0x140083be8]
inc dword [0x140083be4]
mov byte [r15 + rdi], 0
xor r15d, r15d
mov qword [rax + rcx*8], rdi
jmp 0x140041b64
add rbx, 2
movzx eax, word [rbx]
movzx ecx, ax
test ax, ax
jne 0x140041970
call qword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
mov ecx, 0xfde9
mov dword [0x140083be0], eax
call qword [sym.imp.KERNEL32.dll_SetConsoleOutputCP]
mov eax, dword [0x140083be4]
mov rcx, qword [rbp + 8]
mov dword [rcx], eax
lea rcx, [0x1400414d0]
mov rax, qword [0x140083be8]
mov qword [r13], rax
call fcn.140047c90
mov rcx, qword [rbp + 0x10]
xor rcx, rbp
call fcn.1400474c0
mov rbx, qword [rbp + 0x50]
mov rsi, qword [rbp + 0x58]
mov rdi, qword [rbp + 0x60]
lea rsp, [rbp + 0x20]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret
xor r15d, r15d
mov rcx, qword [0x140083be8]
test rcx, rcx
je 0x140041bad
cmp dword [0x140083be4], 0
mov edi, r15d
jle 0x140041c10
mov rbx, r15
mov rcx, qword [rbx + rcx]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, qword [0x140083be8]
lea rbx, [rbx + 8]
inc edi
cmp edi, dword [0x140083be4]
jl 0x140041bf1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov dword [0x140083be4], r15d
mov qword [0x140083be8], r15
jmp 0x140041bad