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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x4a8
mov eax, dword [0x1046190]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push edi
lea eax, [ebp - 0x4a0]
push eax
push 0x20019
xor edi, edi
push edi
push dword [0x10472a0]
mov dword [ebp - 0x4a4], esi
push 0x80000002
mov dword [ebp - 0x4a0], edi
mov dword [ebp - 0x4a8], edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x1041119
push 0x100a544
lea eax, [esi + 0xc]
push eax
mov dword [ebp - 0x49c], edi
mov dword [ebp - 0x498], 1
call fcn.01033d95
test eax, eax
jne 0x104110d
push 0x1004598
push esi
call fcn.01033d95
test eax, eax
jne 0x104110d
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push ebx
lea eax, [ebp - 0x49c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x498]
push eax
push edi
push 0x100cd78
push dword [ebp - 0x4a0]
mov ebx, 0x208
mov dword [ebp - 0x49c], ebx
call esi
test eax, eax
jne 0x104110c
cmp dword [ebp - 0x498], 1
jne 0x104110c
lea eax, [ebp - 0x20c]
push eax
mov eax, dword [ebp - 0x4a4]
add eax, 0x10
push eax
mov word [ebp - 6], di
call fcn.01033d95
test eax, eax
jne 0x104110c
lea eax, [ebp - 0x49c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x498]
push eax
push edi
push 0x100cd5c
push dword [ebp - 0x4a0]
mov dword [ebp - 0x49c], ebx
call esi
test eax, eax
jne 0x104110c
cmp dword [ebp - 0x498], 1
jne 0x104110c
lea eax, [ebp - 0x20c]
push eax
mov eax, dword [ebp - 0x4a4]
add eax, 4
push eax
call fcn.01033d95
test eax, eax
jne 0x104110c
lea eax, [ebp - 0x49c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x498]
push eax
push edi
push 0x100cd40
push dword [ebp - 0x4a0]
mov dword [ebp - 0x49c], ebx
call esi
test eax, eax
jne 0x104110c
cmp dword [ebp - 0x498], 1
jne 0x104110c
lea eax, [ebp - 0x20c]
push eax
mov eax, dword [ebp - 0x4a4]
add eax, 0x18
push eax
call fcn.01033d95
test eax, eax
jne 0x104110c
lea eax, [ebp - 0x49c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x498]
push eax
push edi
push 0x10056f8
push dword [ebp - 0x4a0]
mov dword [ebp - 0x49c], ebx
call esi
test eax, eax
jne 0x104110c
cmp dword [ebp - 0x498], 1
je 0x1040ef2
cmp dword [ebp - 0x498], 2
jne 0x104110c
cmp dword [ebp - 0x498], 2
mov ebx, 0x103
mov esi, 0x1048bf0
lea eax, [ebp - 0x20c]
jne 0x1040f36
push eax
push ebx
push esi
call fcn.01028a67
lea edi, [ebx + 1]
push edi
lea eax, [ebp - 0x20c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x104110c
push edi
lea eax, [ebp - 0x20c]
jmp 0x1040f3b
push 0x104
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x104110c
mov edi, dword [ebp - 0x4a4]
lea eax, [ebp - 0x20c]
push eax
add edi, 0x1c
push edi
call fcn.01033d95
test eax, eax
jne 0x104110c
push dword [edi]
call fcn.010326f3
test eax, eax
je 0x1040f92
push 0x104
push esi
push dword [edi]
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x104110c
jmp 0x1040f9b
push dword [edi]
push ebx
push esi
call fcn.01028a67
push esi
push 0x1006c68
push ebx
push 0x1049000
call fcn.01028b64
add esp, 0x10
push esi
push ebx
push 0x1048df8
call fcn.01028a67
push dword [edi]
push 0x1006c68
push ebx
push esi
call fcn.01028b64
add esp, 0x10
push dword [edi]
push ebx
push 0x1049208
call fcn.01028a67
push esi
push edi
call fcn.01033d95
test eax, eax
jne 0x104110c
lea eax, [ebp - 0x49c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x498]
push eax
push 0
push 0x1009c3c
push dword [ebp - 0x4a0]
mov dword [ebp - 0x49c], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x104110c
cmp dword [ebp - 0x498], 1
jne 0x104110c
cmp word [ebp - 0x20c], 0x20
lea eax, [ebp - 0x20c]
push eax
push dword [edi]
mov ebx, 0x1007240
mov esi, 0x143
lea eax, [ebp - 0x494]
jne 0x1041059
push 0x100307c
jmp 0x104105a
push ebx
push esi
push eax
call fcn.01028b64
add esp, 0x14
lea eax, [ebp - 0x494]
push eax
mov eax, dword [ebp - 0x4a4]
add eax, 0x14
push eax
call fcn.01033d95
test eax, eax
jne 0x104110c
lea eax, [ebp - 0x49c]
push eax
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x498]
push eax
push 0
push 0x100cd28
push dword [ebp - 0x4a0]
mov dword [ebp - 0x49c], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x1041102
cmp dword [ebp - 0x498], 1
jne 0x1041102
cmp word [ebp - 0x20c], 0x20
lea eax, [ebp - 0x20c]
push eax
push dword [edi]
lea eax, [ebp - 0x494]
jne 0x10410e1
push 0x100307c
jmp 0x10410e2
push ebx
push esi
push eax
call fcn.01028b64
add esp, 0x14
lea eax, [ebp - 0x494]
push eax
mov eax, dword [ebp - 0x4a4]
add eax, 8
push eax
call fcn.01033d95
mov dword [ebp - 0x4a8], 1
pop ebx
push dword [ebp - 0x4a0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x4a8]
pop edi
xor ecx, ebp
pop esi
call fcn.01031a01
leave
ret 4