Function at 0x10058a00
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x240]
sub esp, 0x240
push 0xffffffffffffffff
push 0x10138be0
mov eax, dword fs:[0]
push eax
sub esp, 0x20
mov eax, dword [0x1019d008]
xor eax, ebp
mov dword [ebp + 0x23c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x248]
lea ecx, [ebp + 0x18]
mov ebx, dword [ebp + 0x24c]
push eax
mov dword [ebp - 0x14], ebx
call fcn.10004ac0
mov dword [ebp - 4], 0
mov edx, 0x10160b24
lea ecx, [ebp + 0x18]
call fcn.1005a990
mov edx, 0x10160b24
lea ecx, [ebp + 0x18]
call fcn.1005aa20
lea ecx, [ebp + 0x18]
call fcn.10004f90
test al, al
je 0x10058a85
xor bl, bl
jmp 0x10058ce3
push 0x208
lea eax, [ebp + 0x34]
push 0
push eax
call fcn.10105570
add esp, 0xc
lea eax, [ebp + 0x34]
lea ecx, [ebp + 0x18]
push 0x104
push eax
call fcn.10006030
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x10058acd
lea eax, [ebp + 0x34]
push eax
call fcn.10005260
add esp, 4
lea ecx, [ebp + 0x18]
push eax
lea eax, [ebp + 0x34]
push eax
call fcn.10004c10
lea ecx, [ebp + 0x18]
call fcn.1005d500
lea ecx, [ebp + 0x18]
test al, al
je 0x10058b06
call fcn.10004ba0
cmp ebx, eax
je 0x10058aff
call fcn.10004ba0
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x10058af4
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
mov ecx, ebx
call fcn.10004c10
mov bl, 1
jmp 0x10058ce3
call fcn.10004ba0
mov edi, eax
mov dword [ebp - 0x10], edi
cmp dword [edi + 0x14], 8
jb 0x10058b1b
mov eax, dword [edi]
mov dword [ebp - 0x10], eax
mov esi, dword [edi + 0x10]
mov dword [ebp + 0x30], 0x22
test esi, esi
je 0x10058bbc
lea ecx, [ebp + 0x30]
mov edx, esi
push ecx
mov ecx, eax
call fcn.1000eda0
add esp, 4
test eax, eax
je 0x10058bbc
sub eax, dword [ebp - 0x10]
cmp eax, 2
jae 0x10058bbc
cmp dword [edi + 0x14], 8
mov eax, edi
mov dword [ebp - 0x10], edi
jb 0x10058b59
mov eax, dword [edi]
mov dword [ebp - 0x10], eax
mov dword [ebp + 0x30], 0x22
cmp esi, 1
jbe 0x10058bbc
lea ecx, [ebp + 0x30]
push ecx
lea edx, [esi - 1]
lea ecx, [eax + 2]
call fcn.1000eda0
add esp, 4
test eax, eax
je 0x10058bbc
sub eax, dword [ebp - 0x10]
sar eax, 1
cmp eax, 0xffffffff
je 0x10058bbc
dec eax
lea ecx, [ebp + 0x18]
push eax
push 1
lea eax, [ebp - 0x2c]
push eax
call fcn.1000ea50
mov byte [ebp - 4], 1
mov ecx, ebx
push eax
call fcn.10004fa0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.10004ab0
mov ecx, ebx
call fcn.1005d500
test al, al
jne 0x10058aff
lea ecx, [ebp]
xor esi, esi
call fcn.10005020
mov byte [ebp - 4], 2
mov dword [ebp + 0x30], 0x20
cmp dword [edi + 0x14], 8
lea ebx, [esi + 1]
mov eax, edi
mov dword [ebp - 0x10], edi
jb 0x10058be4
mov eax, dword [edi]
mov dword [ebp - 0x10], eax
mov edx, dword [edi + 0x10]
cmp ebx, edx
jae 0x10058cd5
lea ecx, [ebp + 0x30]
sub edx, ebx
push ecx
lea ecx, [eax + ebx*2]
call fcn.1000eda0
mov esi, eax
add esp, 4
test esi, esi
je 0x10058cd5
sub esi, dword [ebp - 0x10]
sar esi, 1
cmp esi, 0xffffffff
je 0x10058cd5
cmp esi, ebx
je 0x10058bd1
push esi
push 0
lea eax, [ebp - 0x2c]
push eax
lea ecx, [ebp + 0x18]
call fcn.1000ea50
mov byte [ebp - 4], 3
lea ecx, [ebp]
push eax
call fcn.10004fa0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2c]
call fcn.10004ab0
lea ecx, [ebp]
call fcn.100621b0
test al, al
jne 0x10058ca8
push 0x1015b63c
call fcn.10005260
add esp, 4
lea ecx, [ebp]
push eax
push 0x1015b63c
call fcn.100051f0
lea ecx, [ebp]
call fcn.100621b0
test al, al
je 0x10058bd1
lea ecx, [ebp]
call fcn.10004ba0
mov esi, dword [ebp - 0x14]
cmp esi, eax
je 0x10058ca4
call fcn.10004ba0
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x10058c99
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
mov ecx, esi
call fcn.10004c10
mov bl, 1
jmp 0x10058cd7
lea ecx, [ebp]
call fcn.10004ba0
mov esi, dword [ebp - 0x14]
cmp esi, eax
je 0x10058ca4
call fcn.10004ba0
mov ecx, eax
cmp dword [eax + 0x14], 8
jb 0x10058cc6
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
mov ecx, esi
call fcn.10004c10
mov bl, 1
jmp 0x10058cd7
xor bl, bl
mov byte [ebp - 4], 0
lea ecx, [ebp]
call fcn.10004ab0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0x18]
call fcn.10004ab0
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 + 0x23c]
xor ecx, ebp
call fcn.10103789
lea esp, [ebp + 0x240]
pop ebp
ret 8