Function at 0x140054c4c
Capabilities:
Query environment variable

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov dword [rax + 0x20], r9d
mov qword [rax + 0x18], r8
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xd0
mov r12, rcx
lea rcx, [0x1400f2c58]
mov r15d, r9d
mov r14, r8
mov rsi, rdx
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov bl, byte [r12 + 0xd]
mov bpl, byte [rsp + 0x130]
xor r11d, r11d
cmp r15d, r11d
setl al
and bl, 0x11
mov byte [rsp + 0x21], bl
mov byte [rsp + 0x20], al
cmp al, r11b
jne 0x140054cb6
test bpl, 0x40
je 0x140054cbb
mov byte [rsp + 0x21], r11b
mov eax, 0x50
lea rcx, [rsp + 0x40]
and bpl, 1
mov edx, eax
mov byte [rsp + 0x130], bpl
mov dword [rsp + 0x3c], eax
call fcn.14004bedc
cmp r15d, 0x400
jge 0x140054cfe
mov r15d, 0x400
mov rcx, r14
mov edx, r15d
mov dword [rsp + 0x128], r15d
call fcn.14004bf70
mov r13, qword [r14]
mov rbx, qword [rsp + 0x40]
movsxd rax, r15d
lea r8, [r13 + rax*2 - 2]
mov r10d, 0x25
mov qword [rsp + 0x28], r13
lea r9, [r8 - 0x7e4]
mov qword [rsp + 0x30], r8
mov rdi, r13
lea r11d, [r10 - 0x1c]
jmp 0x140054d6c
mov r13, qword [rsp + 0x28]
mov r15d, dword [rsp + 0x128]
mov r12, qword [rsp + 0x110]
jmp 0x140054e78
mov r13, qword [rsp + 0x28]
mov r12, qword [rsp + 0x110]
jmp 0x140054d6e
mov r14, qword [rsp + 0x120]
jmp 0x140055632
mov bpl, byte [rsp + 0x130]
xor edx, edx
cmp rdi, r8
jae 0x14005563f
cmp word [rsi], dx
je 0x14005563f
mov rax, rdi
sub rax, r9
sar rax, 1
cmp eax, edx
jl 0x140054ddb
add r15d, 0x400
sub rdi, r13
mov rcx, r14
mov edx, r15d
sar rdi, 1
mov dword [rsp + 0x128], r15d
call fcn.14004bf70
mov r13, qword [r14]
movsxd rax, r15d
lea r8, [r13 + rax*2 - 2]
xor edx, edx
movsxd rax, edi
lea r9, [r8 - 0x7e4]
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x30], r8
lea rdi, [r13 + rax*2]
lea r10d, [rdx + 0x25]
lea r11d, [rdx + 9]
cmp word [rsi], r10w
je 0x140054e0d
mov ecx, 0x3dd
movzx eax, word [rsi]
cmp ax, dx
je 0x140054d6e
cmp r10w, ax
je 0x140054d6e
mov word [rdi], ax
add rsi, 2
add rdi, 2
sub ecx, 1
jns 0x140054de6
jmp 0x140054d6e
mov r14, rsi
cmp bpl, dl
je 0x140055167
cmp word [rsi + 2], r10w
jne 0x140054e2e
mov word [rdi], r10w
add rdi, 2
add rsi, 4
jmp 0x140054e78
cmp word [rsi + 2], 0x23
jne 0x140054e85
mov rcx, qword [r12 + 0x68]
mov r14, qword [rsp + 0x120]
add rsi, 4
cmp rcx, rdx
je 0x140054d6e
movsxd rax, dword [r12 + 0x60]
mov rcx, qword [rcx + rax*8 + 0x10]
movzx eax, word [rcx]
cmp ax, dx
je 0x140054d6e
add rcx, 2
mov word [rdi], ax
add rdi, 2
mov ax, word [rcx]
cmp ax, dx
jne 0x140054e65
mov r14, qword [rsp + 0x120]
jmp 0x140054d6e
cmp word [rsi + 2], 0x2a
jne 0x140054f4e
mov rcx, qword [r12 + 0x68]
mov r14, qword [rsp + 0x120]
add rsi, 4
cmp rcx, rdx
je 0x140054d6e
movsxd rax, dword [r12 + 0x60]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, qword [rsp + 0x30]
xor r11d, r11d
mov ebp, eax
add eax, 2
movsxd rcx, eax
add rcx, rcx
sub rcx, r8
add rcx, rdi
sar rcx, 1
cmp ecx, r11d
jl 0x140054f15
lea r15d, [r15 + rbp + 0x10]
sub rdi, r13
mov rcx, r14
mov edx, r15d
sar rdi, 1
mov dword [rsp + 0x128], r15d
call fcn.14004bf70
mov r13, qword [r14]
movsxd rax, r15d
lea r8, [r13 + rax*2 - 2]
movsxd rax, edi
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x30], r8
lea rdi, [r13 + rax*2]
movsxd rcx, dword [r12 + 0x60]
mov rax, qword [r12 + 0x68]
mov r10d, 0x25
mov rdx, qword [rax + rcx*8]
lea r9, [r8 - 0x7e4]
lea r11d, [r10 - 0x1c]
jmp 0x140054f44
movzx eax, word [rdx]
mov word [rdi], ax
add rdi, 2
add rdx, 2
sub ebp, 1
jns 0x140054f36
jmp 0x140054d64
cmp word [rsi + 2], 0x40
jne 0x140055019
mov rcx, qword [r12 + 0x68]
mov r14, qword [rsp + 0x120]
add rsi, 4
cmp rcx, rdx
je 0x140054d6e
movsxd rax, dword [r12 + 0x60]
mov rcx, qword [rcx + rax*8 + 8]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, qword [rsp + 0x30]
xor r11d, r11d
mov ebp, eax
add eax, 2
movsxd rcx, eax
add rcx, rcx
sub rcx, r8
add rcx, rdi
sar rcx, 1
cmp ecx, r11d
jl 0x140054fdf
lea r15d, [r15 + rbp + 0x10]
sub rdi, r13
mov rcx, r14
mov edx, r15d
sar rdi, 1
mov dword [rsp + 0x128], r15d
call fcn.14004bf70
mov r13, qword [r14]
movsxd rax, r15d
lea r8, [r13 + rax*2 - 2]
movsxd rax, edi
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x30], r8
lea rdi, [r13 + rax*2]
movsxd rcx, dword [r12 + 0x60]
mov rax, qword [r12 + 0x68]
mov r10d, 0x25
mov rdx, qword [rax + rcx*8 + 8]
lea r9, [r8 - 0x7e4]
lea r11d, [r10 - 0x1c]
jmp 0x14005500f
movzx eax, word [rdx]
mov word [rdi], ax
add rdi, 2
add rdx, 2
sub ebp, 1
jns 0x140055001
jmp 0x140054d64
movzx eax, word [rsi + 2]
sub ax, 0x30
cmp ax, r11w
jbe 0x140055044
cmp word [rsi + 2], 0x7e
jb 0x140055167
movzx eax, word [rsi + 4]
sub ax, 0x30
cmp ax, r11w
ja 0x140055167
cmp word [rsi + 2], 0x7e
mov r13d, edx
jb 0x140055055
mov r13d, r10d
add rsi, 2
mov r12, rdx
add rsi, 2
movzx eax, word [rsi]
sub ax, 0x30
cmp ax, r11w
ja 0x140055077
movzx eax, word [rsi]
lea rcx, [r12 + r12*4]
lea r12, [rax + rcx*2 - 0x30]
jmp 0x140055058
mov rcx, qword [rsp + 0x110]
mov r14, qword [rsp + 0x120]
movsxd rax, dword [rcx + 0x60]
cmp r12, rax
jae 0x140054d48
mov rax, qword [rcx + 0x68]
cmp rax, rdx
je 0x140054d48
mov r12, qword [rax + r12*8]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenW]
xor edx, edx
movsxd rbp, eax
cmp r13d, edx
je 0x1400550d1
cmp word [r12], 0x22
jne 0x1400550d1
cmp word [r12 + rbp*2 - 2], 0x22
jne 0x1400550cb
dec ebp
dec ebp
add r12, 2
mov r8, qword [rsp + 0x30]
mov r14, qword [rsp + 0x120]
lea eax, [rbp + 2]
movsxd rcx, eax
add rcx, rcx
sub rcx, r8
add rcx, rdi
sar rcx, 1
cmp ecx, edx
jl 0x140055135
sub rdi, qword [rsp + 0x28]
lea r15d, [r15 + rbp + 0x10]
mov rcx, r14
mov edx, r15d
sar rdi, 1
mov dword [rsp + 0x128], r15d
call fcn.14004bf70
mov r13, qword [r14]
movsxd rax, r15d
lea r8, [r13 + rax*2 - 2]
movsxd rax, edi
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x30], r8
lea rdi, [r13 + rax*2]
xor edx, edx
jmp 0x14005513a
mov r13, qword [rsp + 0x28]
mov r10d, 0x25
lea r9, [r8 - 0x7e4]
lea r11d, [r10 - 0x1c]
jmp 0x14005515d
movzx eax, word [r12]
mov word [rdi], ax
add rdi, 2
add r12, 2
sub ebp, 1
jns 0x14005514d
jmp 0x14005562a
lea rdx, str._RANDOM_
mov r8d, 8
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
xor edx, edx
cmp eax, edx
jne 0x140055260
add rsi, 0x10
mov word [rsp + 0x50], dx
call fcn.1400475f0
movabs rdx, 0x7fffffffffffffff
lea rcx, [rsp + 0x50]
and rdx, rax
call fcn.1400a935c
xor r11d, r11d
lea rcx, [rsp + 0x50]
mov word [rsp + 0x8e], r11w
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, qword [rsp + 0x30]
mov r14, qword [rsp + 0x120]
cmp eax, 1
mov ebp, eax
mov edx, 0
cmovl ebp, edx
lea eax, [rbp + 2]
movsxd rcx, eax
add rcx, rcx
sub rcx, r8
add rcx, rdi
sar rcx, 1
cmp ecx, edx
jl 0x140055230
lea r15d, [r15 + rbp + 0x10]
sub rdi, r13
mov rcx, r14
mov edx, r15d
sar rdi, 1
mov dword [rsp + 0x128], r15d
call fcn.14004bf70
mov r13, qword [r14]
movsxd rax, r15d
lea r8, [r13 + rax*2 - 2]
movsxd rax, edi
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x30], r8
lea rdi, [r13 + rax*2]
xor edx, edx
mov r10d, 0x25
lea r9, [r8 - 0x7e4]
lea rcx, [rsp + 0x50]
lea r11d, [r10 - 0x1c]
jmp 0x140055256
movzx eax, word [rcx]
mov word [rdi], ax
add rdi, 2
add rcx, 2
sub ebp, 1
jns 0x140055248
jmp 0x140055632
add rsi, 2
mov r10d, 0x25
movzx eax, word [rsi]
mov r12, rsi
cmp ax, dx
je 0x1400552a7
lea r8d, [r10 - 0x1c]
cmp ax, r10w
je 0x1400552a7
cmp ax, 0x3d
je 0x1400552a7
cmp r8w, ax
ja 0x140055291
cmp ax, 0xd
jbe 0x1400552a7
mov ecx, 0x20
cmp cx, ax
je 0x1400552a7
add rsi, 2
mov ax, word [rsi]
cmp ax, dx
jne 0x140055279
movsx ecx, byte [rsp + 0x21]
mov rbp, rsi
mov r15, rsi
sub rbp, r14
mov r13b, dl
mov dword [rsp + 0x38], ecx
sar rbp, 1
cmp word [rsi], r10w
je 0x14005537e
mov r8, qword [rsp + 0x30]
mov r15d, dword [rsp + 0x128]
lea eax, [rbp + 2]
movsxd rcx, eax
add rcx, rcx
sub rcx, r8
add rcx, rdi
sar rcx, 1
cmp ecx, edx
jl 0x14005533a
mov r13, qword [rsp + 0x120]
sub rdi, qword [rsp + 0x28]
lea r15d, [r15 + rbp + 0x10]
mov rcx, r13
mov edx, r15d
sar rdi, 1
mov dword [rsp + 0x128], r15d
call fcn.14004bf70
mov r13, qword [r13]
movsxd rax, r15d
xor edx, edx
mov qword [rsp + 0x28], r13
lea r8, [r13 + rax*2 - 2]
movsxd rax, edi
lea r10d, [rdx + 0x25]
mov qword [rsp + 0x30], r8
lea rdi, [r13 + rax*2]
jmp 0x14005533f
mov r13, qword [rsp + 0x28]
sub ebp, 1
mov r12, qword [rsp + 0x110]
lea r9, [r8 - 0x7e4]
mov r11d, 9
js 0x140054d57
movzx eax, word [r14]
add r14, 2
mov word [rdi], ax
add rdi, 2
sub ebp, 1
jns 0x14005535d
mov r14, qword [rsp + 0x120]
jmp 0x14005562a
cmp byte [rsp + 0x20], dl
jne 0x1400553c1
cmp word [r12], 0x26
je 0x14005539c
mov eax, 0x5e
cmp cl, dl
je 0x1400553c6
cmp ax, word [r12]
je 0x1400553c6
add rsi, 2
cmp word [r12], 0x26
mov r14, r12
jne 0x140055478
mov ebp, 1
add r12, 2
mov dword [rsp + 0x38], ebp
jmp 0x14005547c
mov eax, 0x5e
add rsi, 2
cmp ax, word [r12]
jne 0x1400553d8
add r12, 2
mov r13b, 8
mov r14, r12
mov r8d, dword [rsp + 0x3c]
mov word [rbx], dx
mov word [r15], dx
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
xor edx, edx
cmp eax, edx
mov ebp, eax
jle 0x14005542b
cmp word [rbx], dx
jne 0x14005542b
lea ebx, [rax + 0x64]
lea rcx, [rsp + 0x40]
mov edx, ebx
mov dword [rsp + 0x3c], ebx
call fcn.14004bf70
mov r8d, ebx
mov rbx, qword [rsp + 0x40]
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
xor edx, edx
mov ebp, eax
mov r8, qword [rsp + 0x30]
mov r10d, 0x25
mov word [r15], r10w
cmp word [rbx], dx
jne 0x140055593
mov bpl, byte [rsp + 0x130]
cmp r13b, dl
mov r13, qword [rsp + 0x28]
lea r9, [r8 - 0x7e4]
lea r11d, [r10 - 0x1c]
jne 0x140054d33
mov r13b, 1
lea r9, [r8 - 0x7e4]
cmp byte [rsp + 0x20], dl
jne 0x140054d2e
mov ebp, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x110]
mov word [r15], dx
or r9d, 0xffffffff
xor r8d, r8d
mov rdx, r14
call fcn.140017d60
xor edx, edx
mov r10d, 0x25
mov word [r15], r10w
cmp rax, rdx
jne 0x1400554e5
mov r8, qword [rsp + 0x30]
cmp ebp, edx
mov bpl, byte [rsp + 0x130]
lea r9, [r8 - 0x7e4]
lea r11d, [r10 - 0x1c]
jne 0x140054d2e
cmp r13b, dl
mov r13, qword [rsp + 0x28]
lea r9, [r8 - 0x7e4]
jne 0x140054d33
mov r13b, 1
jmp 0x1400553db
mov r12, qword [rax]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r8, qword [rsp + 0x30]
mov r15d, dword [rsp + 0x128]
mov r14, qword [rsp + 0x120]
mov ebp, eax
add eax, 2
movsxd rcx, eax
xor edx, edx
add rcx, rcx
sub rcx, r8
add rcx, rdi
sar rcx, 1
cmp ecx, edx
jl 0x140055561
sub rdi, qword [rsp + 0x28]
lea r15d, [r15 + rbp + 0x10]
mov rcx, r14
mov edx, r15d
sar rdi, 1
mov dword [rsp + 0x128], r15d
call fcn.14004bf70
mov r13, qword [r14]
movsxd rax, r15d
lea r8, [r13 + rax*2 - 2]
movsxd rax, edi
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x30], r8
lea rdi, [r13 + rax*2]
xor edx, edx
jmp 0x140055566
mov r13, qword [rsp + 0x28]
mov r10d, 0x25
lea r9, [r8 - 0x7e4]
lea r11d, [r10 - 0x1c]
jmp 0x140055589
movzx eax, word [r12]
mov word [rdi], ax
add rdi, 2
add r12, 2
sub ebp, 1
jns 0x140055579
jmp 0x14005562a
mov r15d, dword [rsp + 0x128]
mov r14, qword [rsp + 0x120]
lea eax, [rbp + 2]
movsxd rcx, eax
mov r12, rbx
add rcx, rcx
sub rcx, r8
add rcx, rdi
sar rcx, 1
cmp ecx, edx
jl 0x140055601
sub rdi, qword [rsp + 0x28]
lea r15d, [r15 + rbp + 0x10]
mov rcx, r14
mov edx, r15d
sar rdi, 1
mov dword [rsp + 0x128], r15d
call fcn.14004bf70
mov r13, qword [r14]
movsxd rax, r15d
lea r8, [r13 + rax*2 - 2]
movsxd rax, edi
xor edx, edx
mov qword [rsp + 0x30], r8
lea rdi, [r13 + rax*2]
mov qword [rsp + 0x28], r13
lea r10d, [rdx + 0x25]
jmp 0x140055606
mov r13, qword [rsp + 0x28]
lea r9, [r8 - 0x7e4]
mov r11d, 9
jmp 0x140055625
movzx eax, word [r12]
mov word [rdi], ax
add rdi, 2
add r12, 2
sub ebp, 1
jns 0x140055615
mov r12, qword [rsp + 0x110]
mov bpl, byte [rsp + 0x130]
jmp 0x140054d6e
mov word [rdi], dx
sub rdi, r13
mov rcx, r14
sar rdi, 1
lea edx, [rdi + 2]
call fcn.14004bf70
lea rcx, [rsp + 0x40]
call fcn.140044f24
lea rcx, [0x1400f2c58]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rbx, qword [rsp + 0x118]
mov eax, edi
add rsp, 0xd0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret