Function at 0x1008103
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push 0x278
mov eax, 0x1022dad
call fcn.010041d8
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push 0
mov edi, ecx
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x224], eax
call ebx
mov eax, dword [edi + 0x9c]
test eax, eax
je 0x1013745
lea ecx, [ebp - 0x220]
push ecx
lea ecx, [ebp - 0x21c]
push ecx
lea ecx, [ebp - 0x228]
push ecx
push 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_RegQueryValueExW]
push eax
mov dword [ebp - 0x220], 0x208
call esi
mov dword [ebp - 0x22c], eax
mov ecx, 0xea
test eax, eax
jne 0x1013750
cmp dword [ebp - 0x228], 1
jne 0x100fa6f
and dword [ebp - 4], 0
cmp dword [ebp - 0x228], 2
je 0x100fa95
cmp eax, ecx
mov eax, dword [ebp - 0x220]
mov ecx, dword [ebp - 0x224]
je 0x10137e2
shr eax, 1
push eax
call fcn.010041b7
lea ecx, [ebp - 0x21c]
push ecx
push dword [ebp - 0x220]
push eax
call fcn.0100b84b
test eax, eax
jl 0x101380e
mov eax, dword [ebp - 0x22c]
test eax, eax
jne 0x1013788
or dword [ebp - 4], 0xffffffff
shr dword [ebp - 0x220], 1
mov ecx, dword [ebp - 0x224]
je 0x100fa8e
mov eax, dword [ebp - 0x220]
dec eax
push eax
call fcn.010043c0
xor eax, eax
inc eax
call fcn.01004218
ret 8
cmp dword [ebp - 0x228], 7
je 0x1008189
cmp dword [ebp - 0x228], 2
je 0x1008189
jmp 0x1013758
push 0
jmp 0x10081fd
cmp eax, ecx
je 0x101375b
mov ecx, dword [ebp - 0x224]
mov esi, 0x104
push esi
call fcn.010041b7
push esi
push eax
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea ecx, [eax - 1]
mov dword [ebp - 0x220], eax
cmp ecx, 0x102
ja 0x10137b9
add eax, eax
mov dword [ebp - 0x220], eax
jmp 0x10081d1
push 6
call ebx
xor eax, eax
jmp 0x1008205
cmp eax, ecx
je 0x100817c
push eax
jmp 0x1013747
push 0x80010135
lea ecx, [ebp - 0x244]
call fcn.01018d3b
mov esi, eax
lea edi, [ebp - 0x284]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0x1023954
lea eax, [ebp - 0x284]
push eax
call sub.msvcrt.dll__CxxThrowException
jle 0x1013794
and eax, 0xffff
or eax, 0x80070000
push eax
lea ecx, [ebp - 0x244]
call fcn.01018d3b
mov esi, eax
lea edi, [ebp - 0x254]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0x1023954
lea eax, [ebp - 0x254]
jmp 0x1013782
push 0x80010135
lea ecx, [ebp - 0x244]
call fcn.01018d3b
mov esi, eax
lea edi, [ebp - 0x274]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0x1023954
lea eax, [ebp - 0x274]
jmp 0x1013782
shr eax, 1
push eax
call fcn.010041b7
lea ecx, [ebp - 0x220]
push ecx
push eax
lea eax, [ebp - 0x228]
push eax
push 0
push dword [ebp - 0x230]
push dword [edi + 0x9c]
call esi
jmp 0x10081d7
push eax
lea ecx, [ebp - 0x244]
call fcn.01018d3b
mov esi, eax
lea edi, [ebp - 0x264]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 0x1023954
lea eax, [ebp - 0x264]
jmp 0x1013782