Function at 0x1400557e0
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rsi
push rdi
sub rsp, 0x20
mov ebx, r9d
mov rdi, r8
mov rsi, rdx
call fcn.140055280
mov r8d, ebx
mov rdx, rdi
mov rcx, rsi
cmp eax, 2
jne 0x1400551bf
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp 0x1400556c0
mov rbx, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x38]
add rsp, 0x20
pop rdi
jmp 0x1400557e0
mov qword [rsp + 0x18], rbx
push rsi
push r14
push r15
sub rsp, 0x20
mov r15, rdx
lea rdx, [rsp + 0x58]
movsxd rbx, r8d
mov dword [rsp + 0x58], 0
xor esi, esi
call fcn.140054d40
mov r14, rax
test rax, rax
je 0x1400557cd
xor r8d, r8d
xor edx, edx
mov rcx, rax
mov qword [rsp + 0x48], rdi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
movsxd rdi, eax
test eax, eax
je 0x1400557a2
test ebx, ebx
je 0x1400557a2
mov rcx, rdi
mov qword [rsp + 0x40], rbp
call fcn.140010258
mov rbp, rax
test rax, rax
je 0x14005579d
mov r8d, edi
mov rdx, rax
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov edi, eax
mov dword [rsp + 0x58], eax
test eax, eax
je 0x140055795
lea rdx, [rsp + 0x58]
mov rcx, rbp
call fcn.140054ba0
mov rsi, rax
test rax, rax
je 0x140055783
mov edi, dword [rsp + 0x58]
cmp edi, ebx
jle 0x140055768
lea edi, [rbx - 1]
movsxd rbx, edi
xor r9d, r9d
mov rdx, rax
mov r8, rbx
mov rcx, r15
call fcn.14002aca0
mov byte [rbx + r15], 0
jmp 0x140055795
mov r8, rbx
xor r9d, r9d
xor edx, edx
mov rcx, r15
xor edi, edi
call fcn.14002a5a0
mov rcx, rbp
call fcn.140064760
mov rbp, qword [rsp + 0x40]
mov rcx, r14
call fcn.140064760
test rsi, rsi
je 0x1400557b7
mov rcx, rsi
call fcn.140064760
mov eax, edi
mov rdi, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rsi
ret
mov eax, dword [rsp + 0x58]
mov rbx, qword [rsp + 0x50]
add rsp, 0x20
pop r15
pop r14
pop rsi
ret
push rbp
push rdi
push r12
push r14
sub rsp, 0x28
xor ebp, ebp
movsxd r14, r8d
mov r12, rdx
mov rdi, rcx
test rcx, rcx
je 0x140055929
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x58], rbx
call fcn.1400555a0
mov ebx, eax
test eax, eax
je 0x14005585b
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x20], r15
lea r15d, [rax + 1]
movsxd rcx, r15d
add rcx, rcx
call fcn.140010258
mov rsi, rax
test rax, rax
je 0x14005584f
mov r8d, r15d
mov rdx, rax
mov rcx, rdi
call fcn.1400555a0
mov rcx, rsi
test eax, eax
jne 0x14005586b
call fcn.140064760
mov eax, ebx
mov rsi, qword [rsp + 0x60]
mov r15, qword [rsp + 0x20]
mov rbx, qword [rsp + 0x58]
add rsp, 0x28
pop r14
pop r12
pop rdi
pop rbp
ret
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
movsxd rdi, eax
test eax, eax
je 0x14005590d
test r14d, r14d
je 0x14005590d
mov rcx, rdi
add rcx, rcx
call fcn.140010258
mov r15, rax
test rax, rax
je 0x14005590d
mov r8d, edi
mov rdx, rax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
mov dword [rsp + 0x50], eax
test eax, eax
je 0x140055905
lea rdx, [rsp + 0x50]
mov rcx, r15
call fcn.140054ff0
mov rbp, rax
test rax, rax
je 0x1400558f3
mov edi, dword [rsp + 0x50]
cmp edi, r14d
jle 0x1400558d8
lea edi, [r14 - 1]
movsxd rbx, edi
xor r9d, r9d
mov rdx, rax
mov r8, rbx
mov rcx, r12
call fcn.14002aca0
mov byte [rbx + r12], 0
jmp 0x140055905
mov r8, r14
xor r9d, r9d
xor edx, edx
mov rcx, r12
xor edi, edi
call fcn.14002a5a0
mov rcx, r15
call fcn.140064760
mov rcx, rsi
call fcn.140064760
test rbp, rbp
je 0x140055922
mov rcx, rbp
call fcn.140064760
mov eax, edi
jmp 0x140055851
xor eax, eax
add rsp, 0x28
pop r14
pop r12
pop rdi
pop rbp
ret