Function at 0x4080e0
Capabilities:
Query environment variable

Disassembly:
push rdi
push rsi
push rbx
sub rsp, 0x30
mov r11d, dword [0x00ebcf50]
test r11d, r11d
mov rsi, rcx
jle 0x40815b
movsx r10d, byte [rcx]
lea rbx, [0x00ebcf60]
xor r8d, r8d
mov r9, rbx
nop word [rax + rax]
movsx eax, byte [r9]
mov rdx, r9
cmp eax, r10d
jne 0x40814b
test r10d, r10d
je 0x408250
mov rax, rsi
jmp 0x408138
test ecx, ecx
je 0x408250
add rax, 1
add rdx, 1
movzx edi, byte [rax]
cmp byte [rdx], dil
movsx ecx, byte [rax]
je 0x408130
add r8d, 1
add r9, 0x807f
cmp r8d, r11d
jne 0x408110
movsxd r9, r11d
cmp r9, 4
ja 0x408277
mov rax, r9
mov rdx, r9
mov r8d, 0x7fff
shl rax, 7
shl rdx, 0xf
mov rcx, rsi
lea rbx, [0x00ebcf60]
sub rax, r9
lea rdx, [rax + rdx + 0x80]
add rdx, rbx
call qword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
sub eax, 1
cmp eax, 0x7ffd
ja 0x40829f
cmp byte [rsi], 0
je 0x4081c5
xor r9d, r9d
add r9, 1
cmp byte [rsi + r9], 0
jne 0x4081b0
cmp r9, 0x7f
ja 0x4082a3
movsxd r10, dword [0x00ebcf50]
mov rcx, r10
mov rax, r10
mov r11, r10
shl rax, 0xf
shl rcx, 7
add rcx, rax
xor eax, eax
sub rcx, r10
add rcx, rbx
jmp 0x408203
mov byte [rcx + rax], dl
add rax, 1
cmp rax, 0x80
je 0x408298
movzx edx, byte [rsi + rax]
test dl, dl
jne 0x4081f0
mov edx, pe_nt_image_headers64
sub rdx, rax
add rcx, rax
call fcn.00401910
mov rdx, r10
mov rax, r10
add r11d, 1
shl rdx, 7
shl rax, 0xf
mov dword [0x00ebcf50], r11d
add rax, rdx
sub rax, r10
lea rax, [rbx + rax + 0x80]
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
movsxd r8, r8d
mov rax, r8
mov rdx, r8
shl rax, 7
shl rdx, 0xf
sub rax, r8
lea rax, [rax + rdx + 0x80]
add rax, rbx
add rsp, 0x30
pop rbx
pop rsi
pop rdi
ret
mov qword [rsp + 0x20], 5
lea r8, str.__num_env_vars_______kEnvVariables__
mov edx, 0x2442
lea rcx, str.gotsan.cpp
call fcn.00406910
xor edx, edx
jmp 0x408213
xor eax, eax
jmp 0x40826f
mov qword [rsp + 0x20], pe_nt_image_headers64
lea r8, str.__internal_strlen_name________kMaxEnvNameLength__
mov edx, 0x2446
lea rcx, str.gotsan.cpp
call fcn.00406910
nop
nop word cs:[rax + rax]
sub rsp, 0x38
xor r9d, r9d
mov edx, 0x244f
lea r8, str.__0___unimplemented_______0_
lea rcx, str.gotsan.cpp
mov qword [rsp + 0x20], 0
call fcn.00406910
nop
nop dword [rax]
sub rsp, 0x38
xor r9d, r9d
mov edx, 0x2453
lea r8, str.__0___unimplemented_______0_
lea rcx, str.gotsan.cpp
mov qword [rsp + 0x20], 0
call fcn.00406910
nop
nop dword [rax]
sub rsp, 0x38
xor r9d, r9d
mov edx, 0x248c
lea r8, str.__0___unimplemented_______0_
lea rcx, str.gotsan.cpp
mov qword [rsp + 0x20], 0
call fcn.00406910
nop
nop dword [rax]
sub rsp, 0x38
xor r9d, r9d
mov edx, 0x2492
lea r8, str.__0___unimplemented_______0_
lea rcx, str.gotsan.cpp
mov qword [rsp + 0x20], 0
call fcn.00406910
nop
nop dword [rax]
sub rsp, 0x38
xor r9d, r9d
mov edx, 0x2496
lea r8, str.__0___unimplemented_______0_
lea rcx, str.gotsan.cpp
mov qword [rsp + 0x20], 0
call fcn.00406910
nop
nop dword [rax]
sub rsp, 0x38
xor r9d, r9d
mov edx, 0x249a
lea r8, str.__0___unimplemented_______0_
lea rcx, str.gotsan.cpp
mov qword [rsp + 0x20], 0
call fcn.00406910
nop
nop dword [rax]
sub rsp, 0x38
xor r9d, r9d
mov edx, 0x249e
lea r8, str.__0___unimplemented_______0_
lea rcx, str.gotsan.cpp
mov qword [rsp + 0x20], 0
call fcn.00406910
nop
nop dword [rax]
sub rsp, 0x48
cmp qword [0x006bcab8], 0
je 0x408450
lea rcx, [rsp + 0x30]
call qword [sym.imp.kernel32.dll_QueryPerformanceCounter]
imul rax, qword [rsp + 0x30], 0x3b9aca00
cqo
idiv qword [0x006bcab8]
add rsp, 0x48
ret
lea rcx, [0x006bcab8]
call qword [sym.imp.kernel32.dll_QueryPerformanceFrequency]
cmp qword [0x006bcab8], 0
jne 0x40842e
lea r8, str.__frequency.QuadPart_______0__
xor r9d, r9d
mov edx, 0x24bc
mov qword [rsp + 0x20], 0
lea rcx, str.gotsan.cpp
call fcn.00406910
nop
nop dword [rax]