Function at 0x489820
Capabilities:
Query environment variable

Disassembly:
mov r11, rsp
sub rsp, 0x2a8
mov rax, qword [0x00507af8]
xor rax, rsp
mov qword [rsp + 0x250], rax
mov qword [r11 - 0x10], rbp
mov qword [r11 - 0x18], rsi
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
mov qword [r11 - 0x30], r13
mov qword [r11 - 0x38], r14
mov rsi, rcx
lea rcx, [fcn.00492100]
mov qword [r11 - 0x40], r15
mov r14, r9
mov rbp, r8
mov dword [rsp + 0x20], edx
call fcn.00490e70
mov rcx, 0xffffffffffffffff
mov rdi, rbp
mov r15, rax
mov qword [rsp + 0x30], rax
xor eax, eax
repne scasw ax, word [rdi]
lea edx, [rax + 2]
not rcx
and ecx, ecx
mov r12d, ecx
call fcn.00499470
test rax, rax
mov r13, rax
mov qword [rsp + 0x28], rax
jne 0x4898b7
mov rcx, r15
mov word [rsi], ax
call fcn.00490e70
xor eax, eax
jmp 0x489bcd
mov r8, rbp
mov rdx, r12
mov rcx, rax
mov qword [rsp + 0x2a0], rbx
mov ebx, 1
call fcn.00494270
mov rdx, r12
mov rcx, r13
call fcn.004961b0
test r14, r14
je 0x489b9a
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, r14
repne scasw ax, word [rdi]
not rcx
cmp rcx, rbx
je 0x489b9a
mov rdx, r14
mov rcx, rbp
call fcn.00491bd0
test rax, rax
je 0x489b9a
lea rdx, str.http:__
mov rcx, r13
call fcn.00491bd0
test rax, rax
jne 0x489b9a
lea rdx, str.https:__
mov rcx, r13
call fcn.00491bd0
test rax, rax
jne 0x489b9a
lea rdx, str.ftp:__
mov rcx, r13
call fcn.00491bd0
test rax, rax
jne 0x489b9a
mov r8, rbp
mov rdx, r12
mov rcx, r13
call fcn.00494270
mov rdx, r14
mov rcx, r13
mov rdi, r13
call fcn.00491bd0
xor r13d, r13d
test rax, rax
mov rbp, rax
mov word [rsi], 0
je 0x489b29
mov r12d, dword [rsp + 0x20]
mov r8, rdi
mov rdx, r12
mov rcx, rsi
mov word [rbp], r13w
call fcn.004992d0
mov ebx, r13d
test eax, eax
sete bl
test ebx, ebx
je 0x489b46
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, r14
repne scasw ax, word [rdi]
mov rdx, r14
not rcx
lea r15, [rbp + rcx*2 - 2]
mov rcx, r15
call fcn.00491bd0
test rax, rax
mov qword [rsp + 0x38], rax
je 0x489b68
mov word [rax], r13w
lea rdx, [rsp + 0x40]
mov r8d, 0x104
mov rcx, r15
mov word [rsp + 0x40], r13w
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ebp, [rax + 1]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebp, 1
jne 0x489a77
cmp eax, 0xcb
jne 0x489a77
mov r8, r14
mov rdx, r12
mov rcx, rsi
call fcn.004992d0
mov ebx, r13d
test eax, eax
sete bl
test ebx, ebx
je 0x489b46
mov r8, r15
mov rdx, r12
mov rcx, rsi
call fcn.004992d0
mov ebx, r13d
test eax, eax
sete bl
test ebx, ebx
je 0x489b46
mov r8, r14
mov rdx, r12
mov rcx, rsi
call fcn.004992d0
mov ebx, r13d
test eax, eax
sete bl
test ebx, ebx
je 0x489b46
jmp 0x489af6
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, rsi
repne scasw ax, word [rdi]
mov r8d, ebp
not rcx
lea rax, [rcx + rbp]
cmp rax, r12
ja 0x489b63
cmp ebp, 1
jbe 0x489af6
cmp ebp, 0x104
ja 0x489ab8
lea r8, [rsp + 0x40]
mov rdx, r12
mov rcx, rsi
call fcn.004992d0
jmp 0x489af6
mov edx, 2
mov rcx, r8
call fcn.00499470
test rax, rax
mov rdi, rax
je 0x489b5e
mov r8d, ebp
mov rdx, rax
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov r8, rdi
mov rdx, r12
mov rcx, rsi
call fcn.004992d0
mov rcx, rdi
call fcn.00494180
xor eax, eax
mov rcx, 0xffffffffffffffff
mov rdi, r14
repne scasw ax, word [rdi]
mov rax, qword [rsp + 0x38]
mov rdx, r14
not rcx
lea rdi, [rax + rcx*2 - 2]
mov rcx, rdi
call fcn.00491bd0
test rax, rax
mov rbp, rax
jne 0x489992
cmp word [rdi], r13w
je 0x489b46
mov edx, dword [rsp + 0x20]
mov r8, rdi
mov rcx, rsi
call fcn.004992d0
mov ebx, r13d
test eax, eax
sete bl
mov rcx, qword [rsp + 0x28]
call fcn.00494180
mov rcx, qword [rsp + 0x30]
call fcn.00490e70
mov eax, ebx
jmp 0x489bc5
mov ebx, r13d
jmp 0x489b46
mov ebx, r13d
jmp 0x489b46
mov r8, r14
mov rdx, r12
mov rcx, rsi
call fcn.004992d0
mov ebx, r13d
test eax, eax
sete bl
test ebx, ebx
je 0x489b46
mov r8, r15
mov rdx, r12
mov rcx, rsi
call fcn.004992d0
mov ebx, r13d
test eax, eax
sete bl
jmp 0x489b46
mov rcx, r13
call fcn.00494180
mov edx, dword [rsp + 0x20]
mov r8, rbp
mov rcx, rsi
call fcn.00494270
xor r13d, r13d
mov rcx, r15
test eax, eax
sete r13b
call fcn.00490e70
mov eax, r13d
mov rbx, qword [rsp + 0x2a0]
mov r15, qword [rsp + 0x268]
mov r14, qword [rsp + 0x270]
mov r13, qword [rsp + 0x278]
mov r12, qword [rsp + 0x280]
mov rdi, qword [rsp + 0x288]
mov rsi, qword [rsp + 0x290]
mov rbp, qword [rsp + 0x298]
mov rcx, qword [rsp + 0x250]
xor rcx, rsp
call fcn.004902e0
add rsp, 0x2a8
ret