Function at 0x140107980
Capabilities:
Query environment variable

Disassembly:
mov qword [rsp + 8], rcx
push rbp
mov eax, 0xa0
call fcn.14028b850
sub rsp, rax
lea rbp, [rsp + 0x40]
mov rax, qword [0x1403710d8]
xor rax, rbp
mov qword [rbp + 0x50], rax
xor r8d, r8d
xor edx, edx
lea rcx, str.OPENSSL_WIN32_UTF8
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
test eax, eax
je 0x140107cc2
mov qword [rbp + 0x28], 0
mov dword [rbp + 8], 0
mov qword [rbp + 0x20], 0
mov qword [rbp + 0x10], 0
mov dword [rbp], 0
mov dword [rbp + 0x30], 8
call qword [sym.imp.KERNEL32.dll_GetACP]
mov dword [rbp + 0x18], eax
cmp dword [rbp + 0x18], 0xc42c
je 0x140107a4d
cmp dword [rbp + 0x18], 0xc42d
je 0x140107a4d
cmp dword [rbp + 0x18], 0xc42e
je 0x140107a4d
cmp dword [rbp + 0x18], 0xc431
je 0x140107a4d
cmp dword [rbp + 0x18], 0xc433
je 0x140107a4d
cmp dword [rbp + 0x18], 0xc435
je 0x140107a4d
cmp dword [rbp + 0x18], 0xdeaa
jb 0x140107a3e
cmp dword [rbp + 0x18], 0xdeb3
jbe 0x140107a4d
cmp dword [rbp + 0x18], 0xfde8
je 0x140107a4d
cmp dword [rbp + 0x18], 0x2a
jne 0x140107a54
mov dword [rbp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0xffffffff
mov r8, qword [rbp + 0x70]
mov edx, dword [rbp + 0x30]
mov ecx, dword [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rbp + 4], eax
cmp dword [rbp + 4], 0
jle 0x140107afc
movsxd rax, dword [rbp + 4]
lea rax, [rax + rax + 0x10]
cmp rax, 0x400
ja 0x140107ad5
movsxd rcx, dword [rbp + 4]
lea rcx, [rcx + rcx + 0x10]
mov rax, rcx
add rax, 0xf
cmp rax, rcx
ja 0x140107ab4
movabs rax, 0xffffffffffffff0
and rax, 0xfffffffffffffff0
call fcn.14028b850
sub rsp, rax
lea rcx, [rsp + 0x40]
mov edx, 0xcccc
call fcn.140107cf0
mov qword [rbp + 0x40], rax
jmp 0x140107af4
movsxd rcx, dword [rbp + 4]
lea rcx, [rcx + rcx + 0x10]
call sub.MSVCR90.dll_malloc
mov edx, 0xdddd
mov rcx, rax
call fcn.140107cf0
mov qword [rbp + 0x40], rax
mov rax, qword [rbp + 0x40]
mov qword [rbp + 0x20], rax
cmp qword [rbp + 0x20], 0
je 0x140107b44
mov eax, dword [rbp + 4]
mov dword [rsp + 0x28], eax
mov rax, qword [rbp + 0x20]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, qword [rbp + 0x70]
mov edx, dword [rbp + 0x30]
mov ecx, dword [rbp + 0x18]
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov dword [rbp + 0xc], eax
cmp dword [rbp + 0xc], 0
jle 0x140107b44
xor r8d, r8d
xor edx, edx
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [rbp], eax
cmp dword [rbp], 0
jbe 0x140107bbf
mov eax, dword [rbp]
lea rax, [rax + rax + 0x10]
cmp rax, 0x400
ja 0x140107b99
mov ecx, dword [rbp]
lea rcx, [rcx + rcx + 0x10]
mov rax, rcx
add rax, 0xf
cmp rax, rcx
ja 0x140107b78
movabs rax, 0xffffffffffffff0
and rax, 0xfffffffffffffff0
call fcn.14028b850
sub rsp, rax
lea rcx, [rsp + 0x40]
mov edx, 0xcccc
call fcn.140107cf0
mov qword [rbp + 0x48], rax
jmp 0x140107bb7
mov ecx, dword [rbp]
lea rcx, [rcx + rcx + 0x10]
call sub.MSVCR90.dll_malloc
mov edx, 0xdddd
mov rcx, rax
call fcn.140107cf0
mov qword [rbp + 0x48], rax
mov rax, qword [rbp + 0x48]
mov qword [rbp + 0x10], rax
cmp qword [rbp + 0x10], 0
je 0x140107c1a
mov r8d, dword [rbp]
mov rdx, qword [rbp + 0x10]
mov rcx, qword [rbp + 0x20]
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp eax, dword [rbp]
jae 0x140107c1a
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov r9d, 0xffffffff
mov r8, qword [rbp + 0x10]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [rbp + 8], eax
cmp dword [rbp + 8], 0
jle 0x140107c3a
movsxd rcx, dword [rbp + 8]
mov r8d, 0x46
lea rdx, str.....Srcopenssl_3.0.12cryptogetenv.c
call fcn.140087cc0
mov qword [rbp + 0x28], rax
cmp qword [rbp + 0x28], 0
je 0x140107c9c
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov eax, dword [rbp + 8]
mov dword [rsp + 0x28], eax
mov rax, qword [rbp + 0x28]
mov qword [rsp + 0x20], rax
mov r9d, 0xffffffff
mov r8, qword [rbp + 0x10]
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x140107c9c
mov r8d, 0x4c
lea rdx, str.....Srcopenssl_3.0.12cryptogetenv.c
mov rcx, qword [rbp + 0x28]
call fcn.140087f40
mov qword [rbp + 0x28], 0
cmp qword [rbp + 0x20], 0
je 0x140107cac
mov rcx, qword [rbp + 0x20]
call fcn.140107d20
cmp qword [rbp + 0x10], 0
je 0x140107cbc
mov rcx, qword [rbp + 0x10]
call fcn.140107d20
mov rax, qword [rbp + 0x28]
jmp 0x140107cd8
call fcn.14024fed0
test eax, eax
je 0x140107ccf
xor eax, eax
jmp 0x140107cd8
mov rcx, qword [rbp + 0x70]
call sub.MSVCR90.dll_getenv
mov rcx, qword [rbp + 0x50]
xor rcx, rbp
call fcn.14028a900
lea rsp, [rbp + 0x60]
pop rbp
ret