Function at 0x100587e0
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x254]
sub esp, 0x254
push 0xffffffffffffffff
push 0x100a4b78
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, dword [0x100cd008]
xor eax, ebp
mov dword [ebp + 0x250], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov eax, dword [ebp + 0x25c]
mov dword [ebp - 0x10], eax
call fcn.10005010
test eax, eax
jne 0x10058834
xor al, al
jmp 0x10058a89
xor eax, eax
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 0
mov dword [ebp + 0x40], 0
mov dword [ebp + 0x44], 7
mov word [ebp + 0x30], ax
mov dword [ebp - 4], eax
mov eax, ecx
mov edx, dword [ecx + 0x14]
cmp edx, 8
jb 0x10058865
mov eax, dword [ecx]
cmp word [eax], 0x40
jne 0x1005889a
call fcn.10005010
dec eax
mov edx, ecx
push eax
lea ecx, [ebp]
call fcn.100651d0
add esp, 4
mov byte [ebp - 4], 1
lea ecx, [ebp + 0x30]
push eax
call fcn.1000c210
mov byte [ebp - 4], 0
lea ecx, [ebp]
call fcn.10002b90
jmp 0x100588b6
lea eax, [ebp + 0x30]
cmp eax, ecx
je 0x100588b6
mov eax, ecx
cmp edx, 8
jb 0x100588aa
mov eax, dword [ecx]
push dword [ecx + 0x10]
lea ecx, [ebp + 0x30]
push eax
call fcn.10002bf0
push 0x208
lea eax, [ebp + 0x48]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp + 0x48]
cmp dword [ebp + 0x44], 8
lea eax, [ebp + 0x30]
cmovae eax, dword [ebp + 0x30]
push 0x104
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
cmp ebx, 0x104
jb 0x10058946
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.10097a1f
add esp, 4
lea ecx, [ebp + 0x30]
cmp dword [ebp + 0x44], 8
mov esi, eax
cmovae ecx, dword [ebp + 0x30]
push ebx
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10058922
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp + 0x30]
call fcn.10002bf0
push esi
call fcn.10097a28
add esp, 4
jmp 0x1005896c
lea ecx, [ebp + 0x48]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10058950
sub ecx, edx
lea eax, [ebp + 0x48]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp + 0x30]
call fcn.10002bf0
push 2
xor eax, eax
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 0
lea ecx, [ebp + 0x18]
push 0x100b3230
mov dword [ebp + 0x28], 0
mov dword [ebp + 0x2c], 7
mov word [ebp + 0x18], ax
call fcn.10002bf0
mov byte [ebp - 4], 2
lea eax, [ebp + 0x18]
cmp dword [ebp + 0x2c], 8
lea ecx, [ebp + 0x30]
push dword [ebp + 0x28]
cmovae eax, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x44]
cmp ebx, 8
mov edx, dword [ebp + 0x40]
cmovae ecx, dword [ebp + 0x30]
push eax
push 0
call fcn.100147e0
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x10058a4c
push esi
lea edx, [ebp + 0x30]
lea ecx, [ebp]
call fcn.10065150
add esp, 4
mov byte [ebp - 4], 3
mov ecx, edi
push eax
call fcn.1000c210
mov byte [ebp - 4], 2
lea ecx, [ebp]
call fcn.10002b90
mov edi, dword [ebp - 0x10]
test edi, edi
je 0x10058a48
lea ecx, [ebp + 0x30]
call fcn.10005010
mov edx, eax
lea ecx, [ebp + 0x18]
sub edx, esi
call fcn.10005010
sub edx, eax
lea ecx, [ebp]
push edx
lea edx, [ebp + 0x30]
call fcn.100651d0
add esp, 4
mov byte [ebp - 4], 4
lea ecx, [ebp]
cmp dword [ebp + 0x14], 8
cmovae ecx, dword [ebp]
xor edx, edx
call fcn.10064b60
mov dword [edi], eax
mov byte [ebp - 4], 2
lea ecx, [ebp]
call fcn.10002b90
mov bl, 1
jmp 0x10058a6c
lea eax, [ebp + 0x30]
cmp edi, eax
je 0x10058a65
push dword [ebp + 0x40]
cmp ebx, 8
mov ecx, edi
cmovae eax, dword [ebp + 0x30]
push eax
call fcn.10002bf0
cmp dword [ebp - 0x10], 0
sete bl
mov byte [ebp - 4], 0
lea ecx, [ebp + 0x18]
call fcn.10002b90
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x30]
call fcn.10002b90
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x250]
xor ecx, ebp
call fcn.10097213
lea esp, [ebp + 0x254]
pop ebp
ret