Function at 0x140099090
Capabilities:
Query environment variable

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x80
lea rbp, [rsp + 0x30]
mov qword [rbp + 0xa0], rbx
mov rax, qword [0x14010bcf8]
xor rax, rbp
mov qword [rbp + 0x48], rax
mov rax, qword [rcx]
xor esi, esi
mov qword [rbp + 0x10], rdx
mov rdi, rcx
mov r12d, esi
mov rbx, rcx
lea r14d, [rsi + 1]
test rax, rax
je 0x140099148
mov edx, 0x3d
mov rcx, rax
call fcn.1400b1d34
test rax, rax
je 0x140099115
mov r8, qword [rbx]
mov r9d, 0xffffffff
mov dword [rsp + 0x28], esi
xor edx, edx
mov ecx, 0xfde9
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x14009911f
cdqe
add r12, rax
inc r14
mov rax, qword [rbx + 8]
add rbx, 8
jmp 0x1400990d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbp + 0x48]
xor rcx, rbp
call fcn.1400b06c0
mov rbx, qword [rbp + 0xa0]
lea rsp, [rbp + 0x50]
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rcx, [r12 + r12]
call fcn.140090af0
mov qword [rbp + 8], rax
mov r15, rax
test rax, rax
jne 0x140099166
test r12, r12
jne 0x1400992ba
lea rax, [r14*8]
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x140099181
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.1400b0700
sub rsp, rcx
mov rbx, r15
lea r13, [rsp + 0x30]
mov rsi, r13
mov rax, qword [rdi]
test rax, rax
je 0x140099210
mov edx, 0x3d
mov rcx, rax
call fcn.1400b1d34
test rax, rax
je 0x1400991f3
mov r8, qword [rdi]
mov eax, r12d
mov rcx, rbx
mov r9d, 0xffffffff
sub rcx, r15
xor edx, edx
sar rcx, 1
sub eax, ecx
mov ecx, 0xfde9
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x1400991f9
mov qword [rsi], rbx
add rsi, 8
cdqe
lea rbx, [rbx + rax*2]
add rdi, 8
jmp 0x14009919b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, r15
mov ebx, eax
call fcn.140090ac0
mov eax, ebx
jmp 0x140099125
xor ebx, ebx
lea rdx, [r14 - 1]
lea r9, [0x1400994e0]
mov qword [rsi], rbx
mov rcx, r13
lea r8d, [rbx + 8]
call fcn.1400bffe0
mov rsi, r13
lea rdi, [rbp + 0x18]
lea r14, [0x1400e0d00]
nop word [rax + rax]
mov r8, qword [rsi]
test r8, r8
je 0x140099265
mov edx, dword [rbx + r14 + 0x10]
mov rcx, qword [rbx + r14 + 8]
call fcn.140098c10
test eax, eax
js 0x140099265
add rsi, 8
test eax, eax
jne 0x14009928f
jmp 0x140099287
mov rcx, qword [rbx + r14]
xor r8d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [rdi], eax
test eax, eax
je 0x140099287
mov rcx, qword [rbx + r14 + 0x10]
mov eax, eax
add rcx, rax
add r12, rcx
add rbx, 0x18
add rdi, 4
cmp rbx, 0x108
jb 0x140099240
lea rcx, [r12*2 + 2]
call fcn.140090af0
mov qword [rbp], rax
mov r15, rax
test rax, rax
jne 0x1400992c4
mov rcx, qword [rbp + 8]
call fcn.140090ac0
mov eax, reloc.WS2_32.dll_ntohl
jmp 0x140099125
mov r14, rax
xor eax, eax
mov esi, eax
mov edi, eax
nop dword [rax]
mov r8, qword [r13]
test r8, r8
jne 0x140099303
cmp rdi, 0x108
jb 0x14009937a
mov rcx, qword [rbp + 8]
xor ebx, ebx
mov word [r14], bx
call fcn.140090ac0
mov rax, qword [rbp + 0x10]
mov qword [rax], r15
xor eax, eax
jmp 0x140099125
cmp rsi, 0xb
jb 0x14009935a
mov r15d, 1
mov rdx, qword [r13]
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp word [rdx + rbx*2], 0
jne 0x140099320
inc ebx
mov rcx, r14
movsxd r8, ebx
add r8, r8
call fcn.1400b14c0
add r13, 8
test r15d, r15d
jne 0x14009934a
inc rsi
add rdi, 0x18
mov r15, qword [rbp]
movsxd rax, ebx
lea r14, [r14 + rax*2]
jmp 0x1400992d0
lea rax, [0x1400e0d00]
mov edx, dword [rdi + rax + 0x10]
mov rcx, qword [rdi + rax + 8]
call fcn.140098c10
mov r15d, eax
test eax, eax
jns 0x14009930f
mov r15, qword [rbp]
mov ebx, dword [rbp + rsi*4 + 0x18]
test ebx, ebx
je 0x140099343
lea r9, [0x1400e0d00]
mov rdx, r14
mov rcx, qword [rdi + r9 + 8]
movzx eax, word [rcx]
lea rcx, [rcx + 2]
mov word [rdx], ax
lea rdx, [rdx + 2]
test ax, ax
jne 0x140099391
mov rax, qword [rdi + r9 + 0x10]
mov r8d, r12d
mov rcx, qword [rdi + r9]
lea r14, [r14 + rax*2]
mov rax, r14
mov rdx, r14
sub rax, r15
sar rax, 1
sub r8d, eax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea ecx, [rbx - 1]
cmp eax, ecx
je 0x140099343
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
lea rdx, [0x1400e1060]
call fcn.14009c120
int3