Function at 0x140027368
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x1d8]
sub rsp, 0x2b0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14004ffa8]
xor rax, rsp
mov qword [rbp + 0x1a0], rax
mov rsi, rcx
xor r13d, r13d
mov r12b, r13b
mov word [rbp + 0x190], 0x100
or r15, 0xffffffffffffffff
mov qword [rbp + 0x188], r15
xor edx, edx
mov r8d, 0x208
lea rcx, [rbp - 0x80]
call sub.msvcrt.dll_memset
mov r14d, 0x104
lea rdi, [0x140051210]
movzx eax, word [0x140051210]
cmp r13w, ax
jne 0x140027426
mov r8d, r14d
mov rdx, rdi
lea rcx, str._localappdata_MicrosoftInputPersonalization
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x14002741c
mov rcx, rdi
call fcn.14002eab4
test eax, eax
js 0x14002741c
movzx eax, word [0x140051210]
jmp 0x140027426
mov eax, r13d
mov word [0x140051210], ax
neg ax
sbb rbx, rbx
and rbx, rdi
cmp r13w, word [0x140051000]
jne 0x14002746c
mov r8d, r14d
lea rdx, [0x140051000]
lea rcx, str._localappdata_MicrosoftInputPersonalization
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x140027464
lea rcx, [0x140051000]
call fcn.14002eab4
test eax, eax
jns 0x14002746c
mov word [0x140051000], r13w
test rbx, rbx
je 0x1400274a2
mov r8, rbx
mov rdx, r14
lea rcx, [rbp - 0x80]
call fcn.140006470
lea rdx, str.TextHarvesterRestart.sav
lea rcx, [rbp - 0x80]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
cmp eax, 1
jne 0x1400274a2
xor edx, edx
lea rcx, [rbp - 0x80]
call fcn.14002adf0
nop
mov rcx, qword [rbp + 0x188]
cmp rcx, r15
je 0x1400277c8
cmp byte [rbp + 0x190], r13b
jne 0x1400277bd
mov byte [rsp + 0x20], r13b
lea rcx, [rsp + 0x50]
call fcn.140025070
nop
lea rcx, [rsp + 0x40]
call fcn.140025070
nop
mov ebx, reloc.OLEAUT32.dll_SafeArrayGetDim
mov ecx, ebx
call fcn.140035c78
mov qword [rsp + 0x38], rax
test rax, rax
je 0x1400274fd
mov rcx, rax
call fcn.140025070
mov rdi, rax
jmp 0x140027500
mov rdi, r13
mov dword [rsp + 0x28], r13d
mov qword [rsp + 0x30], r13
mov r8, rbx
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x80]
call fcn.14002af80
test al, al
je 0x14002776f
mov rax, qword [rsp + 0x68]
cmp rax, qword [0x14003f760]
jne 0x14002776f
mov rax, qword [rsp + 0x70]
cmp rax, qword [0x14003f768]
jne 0x14002776f
mov r8d, 4
lea rdx, [rsp + 0x28]
lea rcx, [rbp - 0x80]
call fcn.14002af80
mov bl, al
test al, al
je 0x140027588
mov ecx, dword [rsp + 0x28]
mov eax, SafeArrayUnaccessData
mul rcx
cmovo rax, r15
mov rcx, rax
call fcn.140035cbc
mov qword [rsp + 0x30], rax
movzx ebx, bl
test rax, rax
cmove ebx, r13d
mov r14d, r13d
cmp dword [rsp + 0x28], r13d
jbe 0x1400275eb
test bl, bl
je 0x14002776b
mov eax, r14d
lea r15, [rax + rax*4]
mov rdx, qword [rsp + 0x30]
add rdx, 4
lea rdx, [rdx + r15*4]
mov r8d, reloc.OLEAUT32.dll_SafeArrayGetDim
lea rcx, [rbp - 0x80]
call fcn.14002af80
mov bl, al
test al, al
je 0x1400275dd
mov rax, qword [rsp + 0x30]
lea rdx, [rax + r15*4]
mov r8d, 1
lea rcx, [rbp - 0x80]
call fcn.14002af80
mov bl, al
inc r14d
cmp r14d, dword [rsp + 0x28]
jb 0x140027592
or r15, 0xffffffffffffffff
test bl, bl
je 0x14002776f
mov r8d, 1
lea rdx, [rsp + 0x20]
lea rcx, [rbp - 0x80]
call fcn.14002af80
test al, al
je 0x14002776f
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x50]
call fcn.140025518
test al, al
je 0x14002776f
lea rdx, [rbp - 0x80]
lea rcx, [rsp + 0x40]
call fcn.140025518
test al, al
je 0x14002776f
lea rdx, [rbp - 0x80]
mov rcx, rdi
call fcn.140025518
test al, al
je 0x14002776f
mov al, byte [rsp + 0x20]
mov byte [rsi + 0xc9], al
mov edx, r13d
mov ecx, dword [rsp + 0x28]
test ecx, ecx
je 0x1400276c3
movsxd rax, edx
lea r10, [rax + rax*4]
mov r11, qword [rsp + 0x30]
mov r8d, r13d
cmp dword [rsi + 0x68], r13d
jbe 0x1400276bd
mov r9, qword [rsi + 0x70]
mov ebx, r8d
imul r14, rbx, 0xb0
mov rax, qword [r11 + r10*4 + 4]
cmp rax, qword [r14 + r9 + 0x18]
jne 0x14002769f
mov rax, qword [r11 + r10*4 + 0xc]
cmp rax, qword [r14 + r9 + 0x20]
je 0x1400276aa
inc r8d
cmp r8d, dword [rsi + 0x68]
jae 0x1400276bd
jmp 0x14002767d
mov cl, byte [r11 + r10*4]
imul rax, rbx, 0xb0
mov byte [rax + r9], cl
mov ecx, dword [rsp + 0x28]
inc edx
cmp edx, ecx
jb 0x140027664
lea rbx, [rsi + 0x10]
mov qword [rsp + 0x38], rbx
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
cmp byte [rsi + 0xcb], r13b
jne 0x1400276fc
mov rcx, qword [rsi + 0xd0]
test rcx, rcx
je 0x1400276fc
cmp dword [rsp + 0x54], r13d
jle 0x1400276fc
lea rdx, [rsp + 0x50]
call fcn.14002518c
cmp dword [rsp + 0x44], r13d
jle 0x14002771a
mov rcx, qword [rsi + 0xd8]
test rcx, rcx
je 0x14002771a
lea rdx, [rsp + 0x40]
call fcn.14002518c
nop
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [rdi + 4], r13d
jle 0x140027766
mov ecx, reloc.OLEAUT32.dll_SafeArrayGetElement
call fcn.140035c78
mov qword [rsp + 0x38], rax
test rax, rax
je 0x140027755
lea rcx, [0x14003ae50]
mov qword [rax], rcx
mov qword [rax + 8], 1
mov qword [rax + 0x10], rdi
jmp 0x140027758
mov rax, r13
mov qword [rsi + 0xe0], rax
test rax, rax
cmovne rdi, r13
mov r12b, 1
jmp 0x14002776f
or r15, 0xffffffffffffffff
test rdi, rdi
je 0x140027785
mov rcx, rdi
call fcn.1400250a4
mov rcx, rdi
call fcn.140035cb4
nop
mov rax, qword [rsp + 0x30]
test rax, rax
je 0x1400277a1
mov rcx, rax
call fcn.140035cb4
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
lea rcx, [rsp + 0x40]
call fcn.1400250a4
nop
lea rcx, [rsp + 0x50]
call fcn.1400250a4
mov rcx, qword [rbp + 0x188]
cmp rcx, r15
je 0x1400277c8
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov word [rbp + 0x190], r13w
mov dl, 1
lea rcx, [rbp - 0x80]
call fcn.14002adf0
mov rcx, qword [rbp + 0x188]
mov qword [rsi + 0xb8], rcx
cmp byte [rbp + 0x191], r13b
je 0x1400277fd
cmp rcx, r15
je 0x1400277fd
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, r12b
mov rcx, qword [rbp + 0x1a0]
xor rcx, rsp
call fcn.1400362c0
lea r11, [rsp + 0x2b0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret