Function at 0x180052810
Capabilities:
Query environment variable

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1e0]
sub rsp, 0x2e0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x320], rbx
mov rax, qword [0x180106010]
xor rax, rsp
mov qword [rbp + 0x1d0], rax
mov r14, r8
mov qword [rsp + 0x28], r8
lea rcx, [rsp + 0x70]
call fcn.180006d90
nop
lea rcx, [rsp + 0x70]
call fcn.180006090
mov rsi, rax
xor r12d, r12d
cmp rax, 1
jb 0x1800528fc
mov edi, r12d
test rax, rax
je 0x1800528fc
lea rcx, [rsp + 0x70]
call fcn.180005c20
mov rbx, rax
nop
cmp qword [rbx + 0x10], rdi
jbe 0x180052ea4
mov rax, rbx
cmp qword [rbx + 0x18], 8
jb 0x1800528a7
mov rax, qword [rbx]
movzx edx, word [rax + rdi*2]
lea rcx, str.__r_t_n
call fcn.18008a658
test rax, rax
je 0x1800528c4
inc rdi
cmp rdi, rsi
jb 0x180052890
test rdi, rdi
je 0x1800528fc
lea r9, [rbx + 0x10]
mov r8, rdi
xor edx, edx
mov rcx, rbx
call fcn.18000a580
mov r8, qword [r9]
cmp qword [rbx + 0x18], 8
jb 0x1800528e7
mov rbx, qword [rbx]
sub r8, rax
mov qword [r9], r8
inc r8
lea rdx, [rbx + rax*2]
mov rcx, rbx
call fcn.180006328
lea rcx, [rsp + 0x70]
call fcn.180006090
mov r15, rax
cmp rax, 1
jb 0x1800529cb
mov rdi, rax
test rax, rax
je 0x1800529cb
lea rcx, [rsp + 0x70]
call fcn.180005c20
mov rbx, rax
lea rsi, [rdi*2 - 2]
nop dword [rax]
nop dword [rax + rax]
lea r14, [rdi - 1]
cmp qword [rbx + 0x10], r14
jbe 0x180052eaa
mov rax, rbx
cmp qword [rbx + 0x18], 8
jb 0x18005295b
mov rax, qword [rbx]
movzx edx, word [rsi + rax]
lea rcx, str.__r_t_n
call fcn.18008a658
test rax, rax
je 0x18005297c
mov rdi, r14
sub rsi, 2
test r14, r14
jne 0x180052940
cmp rdi, r15
jae 0x1800529c6
lea r10, [rbx + 0x10]
mov r9, qword [r10]
cmp r9, rdi
jb 0x180052e9e
sub r15, rdi
mov r8, r15
mov rdx, rdi
mov rcx, rbx
call fcn.18000a580
cmp qword [rbx + 0x18], 8
jb 0x1800529ac
mov rbx, qword [rbx]
lea rcx, [rbx + rdi*2]
sub r9, rax
mov qword [r10], r9
sub r9, rdi
lea r8, [r9 + 1]
lea rdx, [rcx + rax*2]
call fcn.180006328
mov r14, qword [rsp + 0x28]
lea rcx, [rsp + 0x70]
call fcn.180005e24
test al, al
je 0x1800529e0
xor bl, bl
jmp 0x180052e61
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x40]
call fcn.18008a090
lea rcx, [rsp + 0x70]
call fcn.180005be4
mov rcx, rax
mov r8d, 0x104
lea rdx, [rbp - 0x40]
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x180052a2c
lea rcx, [rbp - 0x40]
call fcn.180006330
mov r8, rax
lea rdx, [rbp - 0x40]
lea rcx, [rsp + 0x70]
call fcn.180006098
lea rcx, [rsp + 0x70]
call fcn.180056060
lea rcx, [rsp + 0x70]
test al, al
je 0x180052a73
call fcn.180005c20
cmp r14, rax
je 0x180052a6c
lea rcx, [rsp + 0x70]
call fcn.180005c20
mov rdx, rax
cmp qword [rax + 0x18], 8
jb 0x180052a60
mov rdx, qword [rax]
mov r8, qword [rax + 0x10]
mov rcx, r14
call fcn.180006098
mov bl, 1
jmp 0x180052e61
call fcn.180005c20
mov r10, rax
mov rcx, rax
mov r11, qword [rax + 0x18]
cmp r11, 8
jb 0x180052a8b
mov rcx, qword [rax]
mov rbx, qword [rax + 0x10]
mov r9d, 0x22
xor r8d, r8d
mov rdx, rbx
call fcn.18000a5c0
test rax, rax
jne 0x180052aff
cmp r11, 8
jb 0x180052aae
mov r10, qword [r10]
mov r8d, 1
mov rdx, rbx
mov rcx, r10
call fcn.18000a5c0
cmp rax, 0xffffffffffffffff
je 0x180052aff
lea r9, [rax - 1]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x70]
call fcn.18000a1d0
nop
mov rdx, rax
mov rcx, r14
call fcn.180005e60
nop
lea rcx, [rsp + 0x50]
call fcn.180005bf4
mov rcx, r14
call fcn.180056060
test al, al
jne 0x180052a6c
mov rbx, r12
lea rcx, [rbp - 0x70]
call fcn.180005bfc
nop
mov edx, 0x20
lea r8d, [rdx - 0x1f]
lea rcx, [rsp + 0x70]
call fcn.18000a230
cmp rax, 0xffffffffffffffff
mov r15, rax
je 0x180052e55
mov r12, rax
mov qword [rsp + 0x38], rax
lea rcx, [rbx + 1]
cmp rax, rcx
je 0x180052dc8
mov r9, rax
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x70]
call fcn.18000a1d0
nop
mov rdx, rax
lea rcx, [rbp - 0x70]
call fcn.180005e60
nop
lea rcx, [rsp + 0x50]
call fcn.180005bf4
lea rcx, [rbp - 0x70]
call fcn.180055740
test al, al
jne 0x180052e1c
lea rcx, [0x1800d2e30]
call fcn.180006330
mov r14, rax
lea rcx, [rbp - 0x70]
call fcn.180005c20
mov rbx, rax
mov rsi, qword [rax + 0x10]
mov r13, qword [rax + 0x18]
mov rcx, r13
sub rcx, rsi
cmp r14, rcx
ja 0x180052beb
lea rdi, [rsi + r14]
mov qword [rax + 0x10], rdi
cmp r13, 8
jb 0x180052bbe
mov rbx, qword [rax]
lea rcx, [rbx + rsi*2]
mov r8, r14
lea rdx, [0x1800d2e30]
call fcn.180006328
xor eax, eax
mov word [rsp + 0x20], ax
lea rcx, [rbx + rdi*2]
lea rdx, [rsp + 0x20]
call fcn.180005cc8
jmp 0x180052dbb
lea rcx, [rbp - 0x70]
call fcn.180006d84
sub rax, rsi
cmp rax, r14
jb 0x180052e98
lea r12, [rsi + r14]
lea rcx, [rbp - 0x70]
call fcn.180006d84
mov rdi, rax
lea rcx, [rbp - 0x70]
call fcn.180005c20
mov rcx, r12
or rcx, 7
mov qword [rbp - 0x50], rcx
cmp rcx, rdi
ja 0x180052c58
mov rdx, qword [rax + 0x18]
mov rcx, rdx
shr rcx, 1
mov rax, rdi
sub rax, rcx
cmp rdx, rax
ja 0x180052c58
lea rax, [rdx + rcx]
mov qword [rsp + 0x40], rax
lea rdx, [rsp + 0x40]
lea rcx, [rbp - 0x50]
call fcn.18000621c
mov rdi, qword [rax]
mov rax, rdi
add rax, 1
mov r8, 0xffffffffffffffff
cmovb rax, r8
lea rdx, [rax + rax]
movabs rcx, 0x7fffffffffffffff
cmp rax, rcx
jbe 0x180052c82
mov rdx, r8
jmp 0x180052c8b
cmp rdx, 0x1000
jb 0x180052cb5
lea rcx, [rdx + 0x27]
cmp rcx, rdx
cmovbe rcx, r8
call fcn.180086a58
mov rcx, rax
test rax, rax
je 0x180052eb0
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x180052cc6
test rdx, rdx
je 0x180052cc4
mov rcx, rdx
call fcn.180086a58
jmp 0x180052cc6
xor eax, eax
mov qword [rsp + 0x30], rax
mov qword [rbx + 0x10], r12
mov qword [rbx + 0x18], rdi
mov r12, qword [rsp + 0x30]
mov r8, rsi
mov rcx, r12
cmp r13, 8
jb 0x180052d5a
mov rdi, qword [rbx]
mov rdx, rdi
call fcn.180006328
lea rcx, [r12 + rsi*2]
mov r8, r14
lea rdx, [0x1800d2e30]
call fcn.180006328
xor eax, eax
mov word [rsp + 0x20], ax
lea rax, [rsi + r14]
lea rcx, [r12 + rax*2]
lea rdx, [rsp + 0x20]
call fcn.180005cc8
lea rdx, [r13*2 + 2]
cmp rdx, 0x1000
jb 0x180052d48
add rdx, 0x27
mov rcx, qword [rdi - 8]
sub rdi, rcx
lea rax, [rdi - 8]
cmp rax, 0x1f
ja 0x180052eb6
mov rdi, rcx
mov rcx, rdi
call fcn.1800862a4
mov rax, qword [rsp + 0x30]
mov qword [rbx], rax
jmp 0x180052db6
mov rdx, rbx
call fcn.180006328
lea rcx, [r12 + rsi*2]
mov r8, r14
lea rdx, [0x1800d2e30]
call fcn.180006328
xor eax, eax
mov word [rsp + 0x20], ax
lea rax, [rsi + r14]
lea rcx, [r12 + rax*2]
lea rdx, [rsp + 0x20]
call fcn.180005cc8
mov rcx, rbx
call fcn.180005c20
mov rdx, rax
mov ecx, 8
call fcn.180005d08
mov rbx, rax
lea rcx, [rsp + 0x30]
call fcn.180005c20
mov rcx, qword [rax]
mov qword [rbx], rcx
mov r12, qword [rsp + 0x38]
lea rcx, [rbp - 0x70]
call fcn.180055740
test al, al
jne 0x180052de3
lea r8, [r15 + 1]
mov edx, 0x20
lea rcx, [rsp + 0x70]
call fcn.18000a230
mov rbx, r12
jmp 0x180052b1f
lea rcx, [rbp - 0x70]
call fcn.180005c20
mov rbx, qword [rsp + 0x28]
cmp rbx, rax
je 0x180052e18
lea rcx, [rbp - 0x70]
call fcn.180005c20
mov rdx, rax
cmp qword [rax + 0x18], 8
jb 0x180052e0c
mov rdx, qword [rax]
mov r8, qword [rax + 0x10]
mov rcx, rbx
call fcn.180006098
mov bl, 1
jmp 0x180052e57
lea rcx, [rbp - 0x70]
call fcn.180005c20
mov r14, qword [rsp + 0x28]
cmp r14, rax
je 0x180052e18
lea rcx, [rbp - 0x70]
call fcn.180005c20
mov rdx, rax
cmp qword [rax + 0x18], 8
jb 0x180052e45
mov rdx, qword [rax]
mov r8, qword [rax + 0x10]
mov rcx, r14
call fcn.180006098
mov bl, 1
jmp 0x180052e57
xor bl, bl
lea rcx, [rbp - 0x70]
call fcn.180005bf4
nop
lea rcx, [rsp + 0x70]
call fcn.180005bf4
movzx eax, bl
mov rcx, qword [rbp + 0x1d0]
xor rcx, rsp
call fcn.180086280
mov rbx, qword [rsp + 0x320]
add rsp, 0x2e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
call fcn.180006d70
nop
call fcn.18000a5a0
int3
call fcn.18000a5a0
int3
call fcn.18000a5a0
nop
call fcn.18008ccdc
int3
call fcn.18008ccdc
int3