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

Disassembly:
push 0x278
mov eax, 0x1022ded
call fcn.01004bf8
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 0x101387d
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 0x1013888
cmp dword [ebp - 0x228], 1
jne 0x100fa23
and dword [ebp - 4], 0
cmp dword [ebp - 0x228], 2
je 0x100fa49
cmp eax, ecx
mov eax, dword [ebp - 0x220]
mov ecx, dword [ebp - 0x224]
je 0x101391a
shr eax, 1
push eax
call fcn.01004bd7
lea ecx, [ebp - 0x21c]
push ecx
push dword [ebp - 0x220]
push eax
call fcn.0100b7e9
test eax, eax
jl 0x1013946
mov eax, dword [ebp - 0x22c]
test eax, eax
jne 0x10138c0
or dword [ebp - 4], 0xffffffff
shr dword [ebp - 0x220], 1
mov ecx, dword [ebp - 0x224]
je 0x100fa42
mov eax, dword [ebp - 0x220]
dec eax
push eax
call fcn.01003e02
xor eax, eax
inc eax
call fcn.01004c38
ret 8
cmp dword [ebp - 0x228], 7
je 0x10083dd
cmp dword [ebp - 0x228], 2
je 0x10083dd
jmp 0x1013890
push 0
jmp 0x1008451
cmp eax, ecx
je 0x1013893
mov ecx, dword [ebp - 0x224]
mov esi, 0x104
push esi
call fcn.01004bd7
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 0x10138f1
add eax, eax
mov dword [ebp - 0x220], eax
jmp 0x1008425
push 6
call ebx
xor eax, eax
jmp 0x1008459
cmp eax, ecx
je 0x10083d0
push eax
jmp 0x101387f
push 0x80010135
lea ecx, [ebp - 0x244]
call fcn.01018dff
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 0x1023994
lea eax, [ebp - 0x284]
push eax
call sub.msvcrt.dll__CxxThrowException
jle 0x10138cc
and eax, 0xffff
or eax, 0x80070000
push eax
lea ecx, [ebp - 0x244]
call fcn.01018dff
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 0x1023994
lea eax, [ebp - 0x254]
jmp 0x10138ba
push 0x80010135
lea ecx, [ebp - 0x244]
call fcn.01018dff
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 0x1023994
lea eax, [ebp - 0x274]
jmp 0x10138ba
shr eax, 1
push eax
call fcn.01004bd7
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 0x100842b
push eax
lea ecx, [ebp - 0x244]
call fcn.01018dff
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 0x1023994
lea eax, [ebp - 0x264]
jmp 0x10138ba