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

Disassembly:
push 0x440
push 0x1032d28
call fcn.010027c0
mov esi, dword [ebp + 8]
mov dword [ebp - 0x450], esi
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x444], eax
xor edi, edi
mov dword [ebp - 0x438], edi
mov dword [ebp - 0x43c], edi
mov dword [ebp - 0x44c], edi
mov dword [ebp - 0x448], edi
mov dword [ebp - 0x440], edi
push 0x220
push edi
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 4], edi
mov eax, dword [esi + 0xc]
cmp eax, edi
jne 0x10325dd
lea eax, [ebp - 0x43c]
push eax
push 0x20019
push edi
push 0x1032d10
push 0x80000003
mov ebx, dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
call ebx
cmp eax, edi
je 0x10325d1
mov ecx, dword [0x1040184]
cmp ecx, 0x1040184
je 0x1032aa5
test dword [ecx + 0x1c], 0x20000
je 0x1032aa5
cmp byte [ecx + 0x19], 2
jb 0x1032aa5
push eax
push 0x102604c
push 0xe
push dword [ecx + 0x14]
push dword [ecx + 0x10]
call fcn.01001f65
jmp 0x1032aa5
mov dword [ebp - 0x44c], 1
jmp 0x10325ec
mov eax, dword [eax + 0x7c]
mov dword [ebp - 0x43c], eax
mov ebx, dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
lea eax, [ebp - 0x438]
push eax
push 0x20019
push edi
push 0x1032ce4
push dword [ebp - 0x43c]
call ebx
mov edi, 0x208
test eax, eax
jne 0x1032774
mov dword [ebp - 0x430], edi
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x434]
push eax
push 0
push 0x1032cbc
push dword [ebp - 0x438]
mov esi, dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
call esi
test eax, eax
jne 0x103268d
cmp dword [ebp - 0x434], 1
jne 0x1032678
mov eax, dword [ebp - 0x430]
cmp eax, 2
jbe 0x103268d
shr eax, 1
cmp word [ebp + eax*2 - 0x226], 0
jne 0x103268d
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
pop ecx
jmp 0x1032687
cmp dword [ebp - 0x434], 4
jne 0x103268d
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x448], eax
mov dword [ebp - 0x430], edi
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x434]
push eax
push 0
push 0x1032c98
push dword [ebp - 0x438]
call esi
test eax, eax
jne 0x1032701
cmp dword [ebp - 0x434], 1
jne 0x10326ec
mov eax, dword [ebp - 0x430]
cmp eax, 2
jbe 0x1032701
shr eax, 1
cmp word [ebp + eax*2 - 0x226], 0
jne 0x1032701
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
pop ecx
jmp 0x10326fb
cmp dword [ebp - 0x434], 4
jne 0x1032701
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x440], eax
mov dword [ebp - 0x430], edi
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x434]
push eax
push 0
push 0x1032c7c
push dword [ebp - 0x438]
call esi
test eax, eax
jne 0x1032766
cmp dword [ebp - 0x434], 1
jne 0x1032766
mov eax, dword [ebp - 0x430]
shr eax, 1
cmp word [ebp + eax*2 - 0x226], 0
jne 0x1032766
lea eax, [ebp - 0x224]
push eax
push 0x10c
mov eax, dword [ebp - 0x444]
add eax, 8
push eax
call fcn.010056eb
push dword [ebp - 0x438]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
jmp 0x103277a
mov esi, dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
lea eax, [ebp - 0x438]
push eax
push 0x20019
push 0
push 0x1032c08
push dword [ebp - 0x43c]
call ebx
test eax, eax
jne 0x10328f6
mov dword [ebp - 0x430], edi
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x434]
push eax
push 0
push 0x1032cbc
push dword [ebp - 0x438]
call esi
test eax, eax
jne 0x1032811
cmp dword [ebp - 0x434], 1
jne 0x10327fc
mov eax, dword [ebp - 0x430]
cmp eax, 2
jbe 0x1032811
shr eax, 1
cmp word [ebp + eax*2 - 0x226], 0
jne 0x1032811
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
pop ecx
jmp 0x103280b
cmp dword [ebp - 0x434], 4
jne 0x1032811
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x448], eax
mov dword [ebp - 0x430], edi
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x434]
push eax
push 0
push 0x1032c98
push dword [ebp - 0x438]
call esi
test eax, eax
jne 0x1032885
cmp dword [ebp - 0x434], 1
jne 0x1032870
mov eax, dword [ebp - 0x430]
cmp eax, 2
jbe 0x1032885
shr eax, 1
cmp word [ebp + eax*2 - 0x226], 0
jne 0x1032885
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
pop ecx
jmp 0x103287f
cmp dword [ebp - 0x434], 4
jne 0x1032885
mov eax, dword [ebp - 0x224]
mov dword [ebp - 0x440], eax
mov dword [ebp - 0x430], edi
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x434]
push eax
push 0
push 0x1032c7c
push dword [ebp - 0x438]
call esi
test eax, eax
jne 0x10328ea
cmp dword [ebp - 0x434], 1
jne 0x10328ea
mov eax, dword [ebp - 0x430]
shr eax, 1
cmp word [ebp + eax*2 - 0x226], 0
jne 0x10328ea
lea eax, [ebp - 0x224]
push eax
push 0x10c
mov eax, dword [ebp - 0x444]
add eax, 8
push eax
call fcn.010056eb
push dword [ebp - 0x438]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
lea eax, [ebp - 0x438]
push eax
push 0x20019
push 0
push 0x1004b68
push 0x80000002
call ebx
test eax, eax
jne 0x10329e0
mov ebx, dword [ebp - 0x444]
mov dword [ebx + 4], 5
mov dword [ebp - 0x430], edi
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0x434]
push eax
push 0
push 0x1032bd8
push dword [ebp - 0x438]
call esi
test eax, eax
jne 0x1032996
cmp dword [ebp - 0x434], 1
jne 0x1032984
mov eax, dword [ebp - 0x430]
cmp eax, 2
jbe 0x1032996
shr eax, 1
cmp word [ebp + eax*2 - 0x226], 0
jne 0x1032996
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
pop ecx
jmp 0x1032993
cmp dword [ebp - 0x434], 4
jne 0x1032996
mov eax, dword [ebp - 0x224]
mov dword [ebx + 4], eax
mov ecx, dword [ebx + 4]
mov esi, 0x15180
cmp ecx, esi
jbe 0x10329d4
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x10329d1
test dword [eax + 0x1c], 0x20000
je 0x10329d1
cmp byte [eax + 0x19], 2
jb 0x10329d1
push esi
push ecx
push 0x102604c
push 0xf
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01002a94
mov dword [ebx + 4], esi
push dword [ebp - 0x438]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
cmp dword [ebp - 0x440], 1
jne 0x1032aa5
mov esi, dword [ebp - 0x444]
add esi, 8
xor eax, eax
cmp ax, word [esi]
je 0x1032a73
push 0x1032bc8
push esi
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x1032a73
mov edi, 0x104
push edi
lea eax, [ebp - 0x42c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
test eax, eax
je 0x1032a4a
cmp eax, edi
ja 0x1032a4a
lea eax, [ebp - 0x42c]
push eax
add edi, 8
push edi
push esi
call fcn.010056eb
push 0x1032bc0
push edi
push esi
call fcn.010059df
jmp 0x1032aa5
xor eax, eax
mov word [esi], ax
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x1032aa5
test dword [eax + 0x1c], 0x20000
je 0x1032aa5
cmp byte [eax + 0x19], 2
jb 0x1032aa5
push 0x102604c
push 0x11
jmp 0x1032a9a
xor eax, eax
mov word [esi], ax
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x1032aa5
test dword [eax + 0x1c], 0x20000
je 0x1032aa5
cmp byte [eax + 0x19], 2
jb 0x1032aa5
push 0x102604c
push 0x10
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001848
mov dword [ebp - 4], 0xfffffffe
call fcn.01032ad9
mov eax, dword [ebp - 0x440]
mov edi, dword [ebp - 0x444]
mov dword [edi], eax
cmp dword [ebp - 0x448], ebx
je 0x1032b07
cmp eax, 1
jne 0x1032af8
mov dword [edi], 4
jmp 0x1032b07
cmp eax, ebx
je 0x1032b01
cmp eax, 5
jb 0x1032b07
mov dword [edi], 2
lea esi, [edi + 8]
xor eax, eax
cmp ax, word [esi]
jne 0x1032b27
mov eax, dword [edi]
cmp eax, 1
jne 0x1032b1c
mov dword [edi], ebx
jmp 0x1032b27
cmp eax, 4
jne 0x1032b27
mov dword [edi], 2
mov eax, dword [ebp - 0x450]
mov ecx, dword [eax + 0xc]
cmp ecx, ebx
je 0x1032b83
call fcn.01015751
test eax, eax
je 0x1032b83
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x1032b6f
test dword [eax + 0x1c], 0x20000
je 0x1032b6f
cmp byte [eax + 0x19], 2
jb 0x1032b6f
push 0x102604c
push 0x12
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01001848
mov eax, dword [0x1040184]
mov ecx, dword [edi]
dec ecx
dec ecx
je 0x1032b81
dec ecx
dec ecx
jne 0x1032b88
mov dword [edi], 1
jmp 0x1032b83
mov dword [edi], ebx
mov eax, dword [0x1040184]
cmp eax, 0x1040184
je 0x1032bb6
test dword [eax + 0x1c], 0x20000
je 0x1032bb6
cmp byte [eax + 0x19], 4
jb 0x1032bb6
push esi
push dword [edi + 4]
push dword [edi]
push 0x102604c
push 0x13
push dword [eax + 0x14]
push dword [eax + 0x10]
call fcn.01032149
call fcn.01002808
ret 8