Function at 0x1400558c8
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, 0xf0
mov bpl, byte [rsp + 0x150]
mov r12, rcx
mov rsi, rdx
mov al, byte [r12 + 0xd]
xor edx, edx
mov r14d, r9d
cmp r9d, edx
mov r13, r8
setl cl
and al, 0x11
mov byte [rsp + 0x20], al
mov byte [rsp + 0x21], cl
cmp cl, dl
jne 0x140055921
test bpl, bpl
jns 0x140055925
mov byte [rsp + 0x20], dl
mov r15, qword [rsp + 0x158]
mov eax, 1
mov byte [rsp + 0x30], dl
and bpl, al
mov al, dl
mov dword [rsp + 0x40], eax
mov byte [rsp + 0x150], bpl
cmp r15, rdx
je 0x140055953
mov al, byte [r15]
mov byte [rsp + 0x30], al
mov eax, 0x50
lea rcx, [rsp + 0x50]
mov edx, eax
mov dword [rsp + 0x44], eax
call fcn.14004bedc
mov eax, 0x400
cmp r14d, eax
jge 0x140055986
mov edx, eax
mov rcx, r13
mov r14d, eax
mov dword [rsp + 0x148], eax
call fcn.14004bf70
mov r8, qword [r13]
mov rbx, qword [rsp + 0x50]
movsxd rax, r14d
lea r9, [r8 + rax*2 - 2]
mov r11d, 0x25
xor edx, edx
mov qword [rsp + 0x28], r8
mov rdi, r8
lea r10, [r9 - 0x7e4]
mov qword [rsp + 0x38], r9
mov dword [rsp + 0x58], r11d
jmp 0x140055a20
mov r14d, dword [rsp + 0x148]
mov r12, qword [rsp + 0x130]
mov r13, qword [rsp + 0x140]
mov r15, qword [rsp + 0x158]
jmp 0x140055a18
mov r12, qword [rsp + 0x130]
mov r13, qword [rsp + 0x140]
jmp 0x140055a25
mov r12, qword [rsp + 0x130]
mov r13, qword [rsp + 0x140]
jmp 0x140055a20
mov r13, qword [rsp + 0x140]
mov r15, qword [rsp + 0x158]
jmp 0x140055a25
mov r11d, 0x25
mov bpl, byte [rsp + 0x150]
mov ecx, 1
cmp rdi, r9
jae 0x1400564a1
cmp word [rsi], dx
je 0x1400564a1
mov rax, rdi
sub rax, r10
sar rax, 1
cmp eax, edx
jl 0x140055a8e
add r14d, 0x400
sub rdi, r8
mov rcx, r13
mov edx, r14d
sar rdi, 1
mov dword [rsp + 0x148], r14d
call fcn.14004bf70
mov r8, qword [r13]
movsxd rax, r14d
lea r9, [r8 + rax*2 - 2]
movsxd rax, edi
xor edx, edx
lea r10, [r9 - 0x7e4]
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x38], r9
lea rdi, [r8 + rax*2]
lea r11d, [rdx + 0x25]
cmp word [rsi], r11w
je 0x140055acc
mov ecx, 0x3dd
mov r11d, 1
movzx eax, word [rsi]
cmp ax, dx
je 0x140055abe
cmp word [rsp + 0x58], ax
je 0x140055abe
mov word [rdi], ax
add rsi, 2
add rdi, 2
sub ecx, r11d
jns 0x140055a9f
mov ecx, r11d
mov r11d, 0x25
jmp 0x140055a25
mov r15, rsi
mov qword [rsp + 0x60], rsi
cmp bpl, dl
je 0x140055e6d
cmp word [rsi + 2], r11w
jne 0x140055afd
mov r15, qword [rsp + 0x158]
mov word [rdi], r11w
add rdi, 2
add rsi, 4
jmp 0x140055a20
mov eax, 0x23
cmp word [rsi + 2], ax
jne 0x140055b50
mov rcx, qword [r12 + 0x68]
mov r15, qword [rsp + 0x158]
add rsi, 4
cmp rcx, rdx
je 0x140055a20
movsxd rax, dword [r12 + 0x60]
mov rcx, qword [rcx + rax*8 + 0x10]
movzx eax, word [rcx]
cmp ax, dx
je 0x140055a20
add rcx, 2
mov word [rdi], ax
add rdi, 2
mov ax, word [rcx]
cmp ax, dx
jne 0x140055b38
jmp 0x140055a20
mov eax, 0x2a
cmp word [rsi + 2], ax
jne 0x140055c28
mov rcx, qword [r12 + 0x68]
mov r15, qword [rsp + 0x158]
add rsi, 4
cmp rcx, rdx
je 0x140055a20
movsxd rax, dword [r12 + 0x60]
mov rcx, qword [rcx + rax*8]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r9, qword [rsp + 0x38]
mov ebp, eax
add eax, 2
movsxd rcx, eax
xor eax, eax
add rcx, rcx
sub rcx, r9
add rcx, rdi
sar rcx, 1
cmp ecx, eax
jl 0x140055be6
sub rdi, qword [rsp + 0x28]
lea r14d, [r14 + rbp + 0x10]
mov rcx, r13
mov edx, r14d
sar rdi, 1
mov dword [rsp + 0x148], r14d
call fcn.14004bf70
mov r8, qword [r13]
movsxd rax, r14d
lea r9, [r8 + rax*2 - 2]
movsxd rax, edi
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x38], r9
lea rdi, [r8 + rax*2]
jmp 0x140055beb
mov r8, qword [rsp + 0x28]
movsxd rcx, dword [r12 + 0x60]
mov rax, qword [r12 + 0x68]
lea r10, [r9 - 0x7e4]
mov rdx, qword [rax + rcx*8]
mov ecx, 1
sub ebp, ecx
lea r11d, [rcx + 0x24]
js 0x140055cf9
movzx eax, word [rdx]
add rdx, 2
mov word [rdi], ax
add rdi, 2
sub ebp, ecx
jns 0x140055c11
jmp 0x140055cf9
mov eax, 0x40
cmp word [rsi + 2], ax
jne 0x140055d08
mov rcx, qword [r12 + 0x68]
mov r15, qword [rsp + 0x158]
add rsi, 4
cmp rcx, rdx
je 0x140055a20
movsxd rax, dword [r12 + 0x60]
mov rcx, qword [rcx + rax*8 + 8]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r9, qword [rsp + 0x38]
mov ebp, eax
add eax, 2
movsxd rcx, eax
xor eax, eax
add rcx, rcx
sub rcx, r9
add rcx, rdi
sar rcx, 1
cmp ecx, eax
jl 0x140055cbf
sub rdi, qword [rsp + 0x28]
lea r14d, [r14 + rbp + 0x10]
mov rcx, r13
mov edx, r14d
sar rdi, 1
mov dword [rsp + 0x148], r14d
call fcn.14004bf70
mov r8, qword [r13]
movsxd rax, r14d
lea r9, [r8 + rax*2 - 2]
movsxd rax, edi
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x38], r9
lea rdi, [r8 + rax*2]
jmp 0x140055cc4
mov r8, qword [rsp + 0x28]
movsxd rcx, dword [r12 + 0x60]
mov rax, qword [r12 + 0x68]
lea r10, [r9 - 0x7e4]
mov rdx, qword [rax + rcx*8 + 8]
mov ecx, 1
sub ebp, ecx
lea r11d, [rcx + 0x24]
js 0x140055cf9
movzx eax, word [rdx]
add rdx, 2
mov word [rdi], ax
add rdi, 2
sub ebp, ecx
jns 0x140055ce7
mov bpl, byte [rsp + 0x150]
xor edx, edx
jmp 0x140055a25
movzx eax, word [rsi + 2]
sub ax, 0x30
cmp ax, 9
jbe 0x140055d37
mov eax, 0x7e
cmp word [rsi + 2], ax
jb 0x140055e6d
movzx eax, word [rsi + 4]
sub ax, 0x30
cmp ax, 9
ja 0x140055e6d
mov eax, 0x7e
mov r13d, edx
cmp word [rsi + 2], ax
jb 0x140055d4c
mov r13d, r11d
add rsi, 2
mov r12, rdx
add rsi, 2
movzx eax, word [rsi]
sub ax, 0x30
cmp ax, 9
ja 0x140055d6e
movzx eax, word [rsi]
lea rcx, [r12 + r12*4]
lea r12, [rax + rcx*2 - 0x30]
jmp 0x140055d4f
mov rcx, qword [rsp + 0x130]
mov r15, qword [rsp + 0x158]
movsxd rax, dword [rcx + 0x60]
cmp r12, rax
jae 0x1400559ee
mov rax, qword [rcx + 0x68]
mov ecx, 1
cmp rax, rdx
je 0x1400559dc
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 0x140055dd3
cmp word [r12], 0x22
jne 0x140055dd3
cmp word [r12 + rbp*2 - 2], 0x22
lea r11d, [rdx + 1]
jne 0x140055dcc
sub ebp, r11d
sub ebp, r11d
add r12, 2
mov r9, qword [rsp + 0x38]
mov r13, qword [rsp + 0x140]
lea eax, [rbp + 2]
movsxd rcx, eax
add rcx, rcx
sub rcx, r9
add rcx, rdi
sar rcx, 1
cmp ecx, edx
jl 0x140055e37
sub rdi, qword [rsp + 0x28]
lea r14d, [r14 + rbp + 0x10]
mov rcx, r13
mov edx, r14d
sar rdi, 1
mov dword [rsp + 0x148], r14d
call fcn.14004bf70
mov r8, qword [r13]
movsxd rax, r14d
lea r9, [r8 + rax*2 - 2]
movsxd rax, edi
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x38], r9
lea rdi, [r8 + rax*2]
xor edx, edx
jmp 0x140055e3c
mov r8, qword [rsp + 0x28]
mov ecx, 1
lea r10, [r9 - 0x7e4]
sub ebp, ecx
lea r11d, [rcx + 0x24]
js 0x140056233
movzx eax, word [r12]
add r12, 2
mov word [rdi], ax
add rdi, 2
sub ebp, ecx
jns 0x140055e54
jmp 0x140056233
lea rdx, str._RANDOM_
mov r8d, 8
mov rcx, rsi
call qword [sym.imp.SHLWAPI.dll_StrCmpNIW]
xor edx, edx
cmp eax, edx
jne 0x140055f80
add rsi, 0x10
mov word [rsp + 0x70], dx
call fcn.1400475f0
movabs rdx, 0x7fffffffffffffff
lea rcx, [rsp + 0x70]
and rdx, rax
call fcn.1400a935c
xor eax, eax
lea rcx, [rsp + 0x70]
mov word [rsp + 0xae], ax
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r9, qword [rsp + 0x38]
mov r11d, 1
mov ebp, eax
cmp eax, r11d
lea edx, [r11 - 1]
cmovl ebp, edx
lea eax, [rbp + 2]
movsxd rcx, eax
add rcx, rcx
sub rcx, r9
add rcx, rdi
sar rcx, 1
cmp ecx, edx
jl 0x140055f39
sub rdi, qword [rsp + 0x28]
lea r14d, [r14 + rbp + 0x10]
mov rcx, r13
mov edx, r14d
sar rdi, 1
mov dword [rsp + 0x148], r14d
call fcn.14004bf70
mov r8, qword [r13]
movsxd rax, r14d
lea r9, [r8 + rax*2 - 2]
movsxd rax, edi
xor edx, edx
mov qword [rsp + 0x38], r9
lea rdi, [r8 + rax*2]
mov qword [rsp + 0x28], r8
lea r11d, [rdx + 1]
jmp 0x140055f3e
mov r8, qword [rsp + 0x28]
sub ebp, r11d
mov r15, qword [rsp + 0x158]
lea r10, [r9 - 0x7e4]
lea rcx, [rsp + 0x70]
js 0x140055a12
movzx eax, word [rcx]
add rcx, 2
mov word [rdi], ax
add rdi, 2
sub ebp, r11d
jns 0x140055f5b
mov bpl, byte [rsp + 0x150]
mov ecx, 1
jmp 0x140055ac1
add rsi, 2
mov r11d, 0x25
mov r12, rsi
movzx eax, word [rsi]
cmp ax, dx
je 0x140055fa7
cmp ax, r11w
je 0x140055fa7
cmp ax, 0x3d
je 0x140055fa7
add rsi, 2
jmp 0x140055f8d
movsx ecx, byte [rsp + 0x20]
mov r13, rsi
mov rbp, rsi
sub r13, r15
mov qword [rsp + 0x68], rsi
mov r14b, dl
sar r13, 1
mov eax, ecx
mov dword [rsp + 0x48], ecx
cmp word [rsi], r11w
jne 0x14005638d
mov al, byte [rsp + 0x21]
cmp al, dl
jne 0x140056014
cmp word [r12], 0x26
je 0x140055ff0
cmp cl, dl
mov ecx, 0x5e
je 0x140056019
cmp cx, word [r12]
je 0x140056019
add rsi, 2
cmp word [r12], 0x26
mov r15, r12
jne 0x1400560e6
add r12, 2
mov dword [rsp + 0x48], 1
jmp 0x1400560e6
mov ecx, 0x5e
add rsi, 2
cmp cx, word [r12]
jne 0x14005602b
add r12, 2
mov r14b, 8
mov r15, r12
mov word [rbx], dx
cmp byte [rsp + 0x30], dl
jne 0x1400560cd
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8d, dword [rsp + 0x44]
xor eax, eax
mov rdx, rbx
mov rcx, r12
mov word [rbp], ax
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebp, eax
xor eax, eax
cmp ebp, eax
jle 0x140056098
cmp word [rbx], ax
jne 0x140056098
lea ebx, [rbp + 0x64]
lea rcx, [rsp + 0x50]
mov edx, ebx
mov dword [rsp + 0x44], ebx
call fcn.14004bf70
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8d, ebx
mov rbx, qword [rsp + 0x50]
mov rdx, rbx
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov ebp, eax
mov rax, qword [rsp + 0x68]
mov ecx, 0x25
mov word [rax], cx
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor edx, edx
cmp ebp, edx
jg 0x14005614a
cmp eax, 0xcb
jne 0x14005614a
mov rbp, qword [rsp + 0x68]
mov al, byte [rsp + 0x21]
lea r11d, [rdx + 0x25]
mov ecx, 1
cmp r14b, dl
jne 0x14005633d
mov r14b, cl
cmp al, dl
jne 0x14005633d
mov rcx, qword [rsp + 0x130]
mov word [rbp], dx
or r9d, 0xffffffff
xor r8d, r8d
mov rdx, r15
call fcn.140017d60
xor edx, edx
mov r11d, 0x25
mov word [rbp], r11w
cmp rax, rdx
jne 0x140056283
mov r9, qword [rsp + 0x38]
mov r8, qword [rsp + 0x28]
lea r10, [r9 - 0x7e4]
cmp dword [rsp + 0x48], edx
jne 0x1400559ba
cmp r14b, dl
jne 0x140056248
lea eax, [rdx + 1]
mov r14b, al
mov al, byte [rsp + 0x21]
jmp 0x14005602e
mov r15, qword [rsp + 0x158]
cmp r15, rdx
je 0x140056182
mov rax, qword [rsp + 0x130]
cmp byte [rax + 0xd2], dl
jne 0x140056182
mov edx, 0x25
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_StrChrW]
xor edx, edx
cmp rax, rdx
je 0x140056182
lea eax, [rdx + 1]
mov byte [r15], al
mov eax, dword [rsp + 0x40]
mov r9, qword [rsp + 0x38]
mov r14d, dword [rsp + 0x148]
mov r13, qword [rsp + 0x140]
movzx eax, al
cmp ebp, edx
mov r11d, 1
mov r12, rbx
cmovg eax, r11d
mov dword [rsp + 0x40], eax
lea eax, [rbp + 2]
movsxd rcx, eax
add rcx, rcx
sub rcx, r9
add rcx, rdi
sar rcx, 1
cmp ecx, edx
jl 0x140056208
sub rdi, qword [rsp + 0x28]
lea r14d, [r14 + rbp + 0x10]
mov rcx, r13
mov edx, r14d
sar rdi, 1
mov dword [rsp + 0x148], r14d
call fcn.14004bf70
mov r8, qword [r13]
movsxd rax, r14d
lea r9, [r8 + rax*2 - 2]
movsxd rax, edi
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x38], r9
lea rdi, [r8 + rax*2]
xor edx, edx
jmp 0x14005620d
mov r8, qword [rsp + 0x28]
mov ecx, 1
lea r10, [r9 - 0x7e4]
lea r11d, [rcx + 0x24]
jmp 0x14005622f
movzx eax, word [r12]
mov word [rdi], ax
add rdi, 2
add r12, 2
sub ebp, ecx
jns 0x14005621f
mov r12, qword [rsp + 0x130]
mov bpl, byte [rsp + 0x150]
jmp 0x140055a25
mov r14d, dword [rsp + 0x148]
mov r12, qword [rsp + 0x130]
mov r15, qword [rsp + 0x158]
mov bpl, byte [rsp + 0x150]
mov ecx, 1
lea r10, [r9 - 0x7e4]
cmp byte [rsp + 0x20], cl
je 0x1400559e4
jmp 0x140056384
mov r12, qword [rax]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenW]
mov r9, qword [rsp + 0x38]
mov r14d, dword [rsp + 0x148]
mov r13, qword [rsp + 0x140]
mov ebp, eax
add eax, 2
movsxd rcx, eax
xor edx, edx
add rcx, rcx
sub rcx, r9
add rcx, rdi
sar rcx, 1
cmp ecx, edx
jl 0x1400562ff
sub rdi, qword [rsp + 0x28]
lea r14d, [r14 + rbp + 0x10]
mov rcx, r13
mov edx, r14d
sar rdi, 1
mov dword [rsp + 0x148], r14d
call fcn.14004bf70
mov r8, qword [r13]
movsxd rax, r14d
lea r9, [r8 + rax*2 - 2]
movsxd rax, edi
mov qword [rsp + 0x28], r8
mov qword [rsp + 0x38], r9
lea rdi, [r8 + rax*2]
xor edx, edx
jmp 0x140056304
mov r8, qword [rsp + 0x28]
mov r15, qword [rsp + 0x158]
mov ecx, 1
lea r10, [r9 - 0x7e4]
sub ebp, ecx
lea r11d, [rcx + 0x24]
js 0x140056233
movzx eax, word [r12]
add r12, 2
mov word [rdi], ax
add rdi, 2
sub ebp, ecx
jns 0x140056324
jmp 0x140056233
cmp byte [rsp + 0x20], cl
jne 0x14005637c
mov r9, qword [rsp + 0x38]
mov r14d, dword [rsp + 0x148]
mov r12, qword [rsp + 0x130]
mov r8, qword [rsp + 0x28]
mov r15, qword [rsp + 0x158]
mov bpl, byte [rsp + 0x150]
lea r10, [r9 - 0x7e4]
cmp dl, dl
je 0x1400559e4
sub rsi, 2
cmp dl, dl
je 0x140056388
sub rsi, 2
mov r15, qword [rsp + 0x60]
mov r9, qword [rsp + 0x38]
mov r14d, dword [rsp + 0x148]
lea eax, [r13 + 3]
movsxd rcx, eax
add rcx, rcx
sub rcx, r9
add rcx, rdi
sar rcx, 1
cmp ecx, edx
jl 0x1400563fe
mov rbp, qword [rsp + 0x140]
sub rdi, qword [rsp + 0x28]
lea r14d, [r14 + r13 + 0x11]
mov rcx, rbp
mov edx, r14d
sar rdi, 1
mov dword [rsp + 0x148], r14d
call fcn.14004bf70
mov r8, qword [rbp]
movsxd rax, r14d
xor edx, edx
mov qword [rsp + 0x28], r8
lea r9, [r8 + rax*2 - 2]
movsxd rax, edi
lea r11d, [rdx + 0x25]
mov qword [rsp + 0x38], r9
lea rdi, [r8 + rax*2]
jmp 0x140056403
mov r8, qword [rsp + 0x28]
lea r10, [r9 - 0x7e4]
cmp r11w, word [rsi]
jne 0x14005645a
movzx eax, word [rsi + 2]
cmp r11w, ax
je 0x14005644c
mov ebp, 0x2a
cmp bp, ax
je 0x14005644c
mov ebp, 0x40
cmp bp, ax
je 0x14005644c
mov ebp, 0x23
cmp bp, ax
je 0x14005644c
mov ebp, 0x7e
cmp bp, ax
je 0x14005644c
sub ax, 0x30
cmp ax, 9
ja 0x14005645a
mov ecx, 1
add rsi, 2
add r13d, ecx
jmp 0x14005645f
mov ecx, 1
sub r13d, ecx
mov r12, qword [rsp + 0x130]
mov bpl, byte [rsp + 0x150]
js 0x140055a00
movzx eax, word [r15]
add r15, 2
mov word [rdi], ax
add rdi, 2
sub r13d, ecx
jns 0x140056478
mov r13, qword [rsp + 0x140]
mov r15, qword [rsp + 0x158]
jmp 0x140056233
mov eax, dword [rsp + 0x40]
mov word [rdi], dx
cmp al, dl
jne 0x1400564be
cmp r15, rdx
je 0x1400564be
cmp byte [r12 + 0xd2], dl
jne 0x1400564be
mov byte [r15], cl
sub rdi, r8
mov rcx, r13
sar rdi, 1
lea edx, [rdi + 2]
call fcn.14004bf70
lea rcx, [rsp + 0x50]
call fcn.140044f24
mov rbx, qword [rsp + 0x138]
mov eax, edi
add rsp, 0xf0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret