Function at 0x18005f140
Capabilities:
Query environment variable

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1c0]
sub rsp, 0x2c0
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x318], rbx
mov rax, qword [0x180132010]
xor rax, rsp
mov qword [rbp + 0x1b0], rax
mov r12, r8
mov r14, rdx
mov rbx, rcx
xor edi, edi
call fcn.180005f10
test rax, rax
je 0x18005f417
lea rcx, [rsp + 0x40]
call fcn.180005e80
nop
mov rcx, rbx
call fcn.180005ea0
mov r8, rax
mov r9, qword [rax + 0x18]
cmp r9, 8
jb 0x18005f1b9
mov rax, qword [rax]
mov rcx, rbx
cmp word [rax], 0x40
jne 0x18005f1f3
call fcn.180005f10
lea r8d, [rax - 1]
mov rdx, rbx
lea rcx, [rsp + 0x60]
call fcn.18006bf10
nop
mov rdx, rax
lea rcx, [rsp + 0x40]
call fcn.18000681c
nop
lea rcx, [rsp + 0x60]
call fcn.180005de4
jmp 0x18005f21c
call fcn.180005ea0
lea rcx, [rsp + 0x40]
cmp rcx, rax
je 0x18005f21c
mov rdx, r8
cmp r9, 8
jb 0x18005f20e
mov rdx, qword [r8]
mov r8, qword [r8 + 0x10]
lea rcx, [rsp + 0x40]
call fcn.180005f18
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x60]
call fcn.1800a8e10
lea rcx, [rsp + 0x40]
call fcn.18000618c
mov rcx, rax
mov r8d, 0x104
lea rdx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov esi, eax
cmp eax, 0x104
jb 0x18005f2ac
mov eax, 2
mul rsi
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1800a5b84
mov rbx, rax
lea rcx, [rsp + 0x40]
call fcn.18000618c
mov rcx, rax
mov r8d, esi
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, rbx
call fcn.18000608c
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.180005f18
mov rcx, rbx
call fcn.1800a5024
jmp 0x18005f2c6
lea rcx, [rbp - 0x60]
call fcn.18000608c
mov r8, rax
lea rdx, [rbp - 0x60]
lea rcx, [rsp + 0x40]
call fcn.180005f18
lea rdx, [0x1800fadb8]
lea rcx, [rbp - 0x80]
call fcn.180005e38
nop
lea rcx, [rsp + 0x40]
call fcn.180005ea0
mov rbx, rax
lea rcx, [rbp - 0x80]
call fcn.180005ea0
mov r9, rax
cmp qword [rax + 0x18], 8
jb 0x18005f2fa
mov r9, qword [rax]
mov rcx, rbx
mov rsi, qword [rbx + 0x18]
cmp rsi, 8
jb 0x18005f30a
mov rcx, qword [rbx]
mov r13, qword [rbx + 0x10]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x20], rax
xor r8d, r8d
mov rdx, r13
call fcn.180008ac0
mov r15, rax
cmp rax, 0xffffffffffffffff
je 0x18005f3d4
mov r8d, r15d
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.18006beb0
nop
mov rdx, rax
mov rcx, r14
call fcn.18000681c
nop
lea rcx, [rsp + 0x60]
call fcn.180005de4
test r12, r12
je 0x18005f3d0
lea rcx, [rsp + 0x40]
call fcn.180005f10
mov r8, rax
sub r8d, r15d
lea rcx, [rbp - 0x80]
call fcn.180005f10
sub r8d, eax
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.18006bf10
nop
lea rcx, [rsp + 0x60]
call fcn.18000618c
movzx ecx, word [rax]
cmp cx, 0x30
jb 0x18005f3c2
nop dword [rax]
cmp cx, 0x39
ja 0x18005f3c2
lea rdi, [rdi + rdi*4]
movzx ecx, cx
lea rdi, [rdi - 0x18]
lea rdi, [rcx + rdi*2]
add rax, 2
movzx ecx, word [rax]
cmp cx, 0x30
jae 0x18005f3a0
mov dword [r12], edi
lea rcx, [rsp + 0x60]
call fcn.180005de4
mov bl, 1
jmp 0x18005f400
lea rcx, [rsp + 0x40]
call fcn.180005ea0
cmp r14, rax
je 0x18005f3fa
cmp rsi, 8
jb 0x18005f3ec
mov rbx, qword [rbx]
mov r8, r13
mov rdx, rbx
mov rcx, r14
call fcn.180005f18
test r12, r12
sete bl
lea rcx, [rbp - 0x80]
call fcn.180005de4
nop
lea rcx, [rsp + 0x40]
call fcn.180005de4
movzx eax, bl
mov rcx, qword [rbp + 0x1b0]
xor rcx, rsp
call fcn.1800a5000
mov rbx, qword [rsp + 0x318]
add rsp, 0x2c0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret