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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x10723e4]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], eax
mov eax, dword [esi]
mov ebx, dword [eax + 8]
push edi
xor eax, eax
inc eax
xor edi, edi
push ebx
mov dword [ebp - 0x238], edi
mov dword [ebp - 0x234], edi
mov dword [ebp - 0x23c], edi
mov dword [ebp - 0x230], ebx
mov dword [esi + 4], eax
mov dword [esi + 8], eax
mov dword [esi + 0x28], eax
call fcn.0102cd2c
test eax, eax
je 0x1026226
lea eax, [ebp - 0x224]
push eax
push 0x20019
push edi
push 0x1012460
mov dword [esi + 4], edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov word [ebp - 0x10], 0x30
push dword [ebx + 0x68]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
call ebx
test eax, eax
jne 0x10260bd
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x220]
push eax
push edi
push 0x101244c
push dword [ebp - 0x224]
mov dword [ebp - 0x21c], 0xa
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1025f59
cmp dword [ebp - 0x220], 1
jne 0x1025f4a
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.msvcrt.dll_atoi]
pop ecx
jmp 0x1025f56
cmp dword [ebp - 0x220], 4
jne 0x1025f59
mov eax, dword [ebp - 0x10]
mov dword [esi + 4], eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x220]
push eax
push edi
push 0x1012578
push dword [ebp - 0x224]
mov dword [ebp - 0x21c], 0xa
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1025fa2
cmp dword [ebp - 0x220], 1
jne 0x1025fa2
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.msvcrt.dll_atoi]
pop ecx
mov dword [esi + 8], eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x220]
push eax
push edi
push 0x1012560
push dword [ebp - 0x224]
mov dword [ebp - 0x21c], 0xa
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x1025ff0
cmp dword [ebp - 0x220], 1
jne 0x1025ff0
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.msvcrt.dll_atoi]
neg eax
sbb eax, eax
inc eax
pop ecx
mov dword [esi + 0x28], eax
lea eax, [ebp - 0x21c]
push eax
push edi
lea eax, [ebp - 0x220]
push eax
push edi
push 0x1012544
push dword [ebp - 0x224]
mov dword [ebp - 0x21c], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, 2
je 0x10260ae
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov ecx, dword [0x7ffe02d8]
cmp ecx, dword [eax + 0x1d4]
sete al
movzx eax, al
cmp eax, edi
mov dword [ebp - 0x22c], eax
jne 0x102604f
mov dword [ebp - 0x21c], 0x1a
push dword [ebp - 0x21c]
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, edi
mov dword [esi + 0xc], eax
je 0x10260b1
cmp dword [ebp - 0x22c], edi
je 0x102608e
lea ecx, [ebp - 0x21c]
push ecx
push eax
lea eax, [ebp - 0x220]
push eax
push edi
push 0x1012544
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
jmp 0x102609c
push 0x1012518
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
xor eax, eax
cmp eax, edi
je 0x10260b1
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 0xc], edi
jmp 0x10260b1
mov dword [esi + 8], edi
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x228]
push eax
mov eax, dword [ebp - 0x230]
push 0x20019
push edi
push 0x10123d8
push dword [eax + 0x68]
call ebx
test eax, eax
jne 0x102621b
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x220]
push eax
push edi
push 0x101244c
push dword [ebp - 0x228]
mov dword [ebp - 0x21c], 0xa
call ebx
test eax, eax
jne 0x1026144
cmp dword [ebp - 0x220], 1
jne 0x102612c
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.msvcrt.dll_atoi]
pop ecx
jmp 0x1026138
cmp dword [ebp - 0x220], 4
jne 0x102613b
mov eax, dword [ebp - 0x10]
mov dword [esi + 4], eax
mov eax, dword [esi + 4]
mov dword [ebp - 0x23c], eax
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x220]
push eax
push edi
push 0x1012578
push dword [ebp - 0x228]
mov dword [ebp - 0x21c], 0xa
call ebx
test eax, eax
jne 0x102618f
cmp dword [ebp - 0x220], 1
jne 0x102618f
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.msvcrt.dll_atoi]
pop ecx
mov dword [esi + 8], eax
mov dword [ebp - 0x234], eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x21c]
push eax
push edi
lea eax, [ebp - 0x220]
push eax
push edi
push 0x1012544
push dword [ebp - 0x228]
mov dword [ebp - 0x21c], edi
call ebx
cmp eax, 2
je 0x102620f
mov eax, dword [esi + 0xc]
cmp eax, edi
je 0x10261ce
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 0xc], edi
push dword [ebp - 0x21c]
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, edi
mov dword [esi + 0xc], eax
je 0x102620f
lea ecx, [ebp - 0x21c]
push ecx
push eax
lea eax, [ebp - 0x220]
push eax
push edi
push 0x1012544
push dword [ebp - 0x228]
call ebx
test eax, eax
je 0x102620f
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esi + 0xc], edi
push dword [ebp - 0x228]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x230]
call fcn.0102cda5
mov eax, dword [esi + 0xc]
cmp eax, edi
je 0x1026325
cmp word [eax], di
je 0x1026325
push 0x1012534
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x1026325
push dword [esi + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
call ebx
mov dword [ebp - 0x22c], eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, dword [ebp - 0x22c]
mov dword [ebp - 0x230], eax
je 0x10262dc
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 0x10721a4
call ebx
add eax, dword [ebp - 0x230]
lea eax, [eax + eax + 2]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, edi
mov dword [esi + 0xc], eax
je 0x1026338
mov ebx, dword [sym.imp.msvcrt.dll_wcscpy]
lea ecx, [ebp - 0x218]
push ecx
push eax
call ebx
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp - 0x230]
lea eax, [eax + ecx*2]
push 0x10721a4
push eax
call ebx
add esp, 0x10
jmp 0x1026319
push 0x42
push 0x10721a4
call ebx
push dword [esi + 0xc]
mov dword [ebp - 0x22c], eax
call ebx
mov ecx, dword [ebp - 0x22c]
add ecx, eax
lea eax, [ecx + ecx + 2]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, edi
je 0x1026338
push 0x10721a4
push eax
mov dword [esi + 0xc], eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
mov dword [ebp - 0x238], 1
jmp 0x1026338
cmp dword [ebp - 0x234], edi
je 0x1026335
cmp dword [ebp - 0x23c], edi
jne 0x1026338
mov dword [esi + 8], edi
cmp dword [esi + 4], edi
je 0x102634b
push dword [esi]
call fcn.01031b21
test eax, eax
je 0x102634b
mov dword [esi + 4], edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x238]
pop edi
pop esi
pop ebx
call fcn.0103d24a
leave
ret 4