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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x124
mov eax, dword [0x1040190]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x25
push dword [esi + 4]
xor edi, edi
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x120], edi
call dword [sym.imp.msvcrt.dll_wcschr]
pop ecx
pop ecx
mov dword [ebp - 0x114], eax
cmp eax, edi
je 0x102963d
push 0x208
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x114], eax
cmp eax, edi
je 0x102998f
mov ebx, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, 0x104
push edi
push eax
push dword [esi + 4]
call ebx
mov dword [ebp - 0x10c], eax
test eax, eax
je 0x10295d1
cmp eax, edi
jbe 0x102962b
push dword [ebp - 0x114]
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
call edi
mov eax, dword [ebp - 0x10c]
test eax, eax
je 0x102998f
lea eax, [eax + eax + 2]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x114], eax
test eax, eax
je 0x102998f
push dword [ebp - 0x10c]
push eax
push dword [esi + 4]
call ebx
mov dword [ebp - 0x10c], eax
test eax, eax
jne 0x102962b
push dword [ebp - 0x114]
call edi
jmp 0x102998f
mov eax, dword [esi + 4]
mov dword [ebp - 0x120], eax
mov eax, dword [ebp - 0x114]
mov dword [esi + 4], eax
lea eax, [ebp - 0x118]
push eax
push 0x2001f
xor edi, edi
push edi
push 0x1004b68
push 0x80000002
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegOpenKeyExW]
test eax, eax
jne 0x102998f
mov ebx, dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegQueryValueExW]
lea eax, [ebp - 0x104]
mov dword [ebp - 0x108], eax
lea eax, [ebp - 0x10c]
push eax
lea eax, [ebp - 0x104]
push eax
lea eax, [ebp - 0x124]
push eax
push edi
push dword [esi]
mov dword [ebp - 0x10c], 0x100
push dword [ebp - 0x118]
call ebx
cmp eax, edi
je 0x10296f3
cmp eax, 3
je 0x10297d4
cmp eax, 2
je 0x10297d4
push dword [ebp - 0x10c]
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x108], eax
cmp eax, edi
je 0x1029983
lea ecx, [ebp - 0x10c]
push ecx
push eax
lea eax, [ebp - 0x124]
push eax
push edi
push dword [esi]
push dword [ebp - 0x118]
call ebx
test eax, eax
jne 0x102994b
mov eax, dword [ebp - 0x10c]
mov ebx, dword [ebp - 0x108]
shr eax, 1
xor ecx, ecx
mov word [ebx + eax*2 - 2], cx
mov dword [ebp - 0x110], ebx
cmp ebx, edi
je 0x1029841
cmp word [ebx], 0
je 0x1029841
push 0x2c
push ebx
call dword [sym.imp.msvcrt.dll_wcschr]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x1029736
xor eax, eax
mov word [ebx], ax
push dword [esi + 4]
mov edi, dword [ebp - 0x110]
push edi
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x1029827
mov eax, dword [esi + 8]
test eax, eax
je 0x102994b
cmp eax, 1
je 0x102994b
cmp eax, 2
jne 0x1029827
test ebx, ebx
je 0x1029816
lea edi, [ebx + 2]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x102977d
mov ecx, dword [ebp - 0x10c]
shr ecx, 1
add ecx, ecx
sub eax, edx
mov edx, dword [ebp - 0x108]
sub ecx, ebx
sar eax, 1
lea ecx, [ecx + edx - 2]
sar ecx, 1
inc eax
cmp eax, ecx
jae 0x10297be
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10297ad
sub eax, edx
sar eax, 1
lea ecx, [eax + 1]
lea eax, [ecx + ecx]
push eax
push edi
push dword [ebp - 0x110]
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
jmp 0x102981b
mov eax, dword [esi + 8]
cmp eax, edi
je 0x10297e4
cmp eax, 1
jne 0x1029983
mov ecx, dword [esi + 4]
mov eax, ecx
lea ebx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
cmp dx, di
jne 0x10297ec
sub eax, ebx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push ecx
push 1
push edi
push dword [esi]
push dword [ebp - 0x118]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegSetValueExW]
jmp 0x1029983
xor eax, eax
mov word [edi], ax
mov dword [ebp - 0x11c], 1
jmp 0x1029839
test ebx, ebx
je 0x1029841
push 0x2c
pop eax
mov word [ebx], ax
inc ebx
inc ebx
mov dword [ebp - 0x110], ebx
test ebx, ebx
jne 0x1029716
mov eax, dword [esi + 8]
cmp eax, 1
je 0x1029851
test eax, eax
jne 0x102990e
mov eax, dword [esi + 4]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1029857
mov ecx, dword [ebp - 0x10c]
sub eax, edx
sar eax, 1
lea ebx, [ecx + eax*2 + 4]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x102990e
xor eax, eax
mov word [edi], ax
cmp dword [esi + 8], 1
jne 0x10298b9
push dword [esi + 4]
mov dword [ebp - 0x110], ebx
shr dword [ebp - 0x110], 1
push dword [ebp - 0x110]
push edi
call fcn.010056eb
push 0x10064f0
push dword [ebp - 0x110]
push edi
call fcn.010059df
push dword [ebp - 0x108]
shr ebx, 1
push ebx
push edi
call fcn.010059df
cmp dword [esi + 8], 0
jne 0x10298e4
push 0x10064f0
push ebx
push edi
call fcn.010059df
push dword [esi + 4]
push ebx
push edi
call fcn.010059df
lea eax, [ebp - 0x104]
cmp dword [ebp - 0x108], eax
je 0x10298fe
push dword [ebp - 0x108]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [ebp - 0x108], edi
mov dword [ebp - 0x11c], 1
cmp dword [ebp - 0x11c], 0
je 0x102994b
mov eax, dword [ebp - 0x108]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1029920
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
push dword [ebp - 0x108]
push 1
push 0
push dword [esi]
push dword [ebp - 0x118]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegSetValueExW]
lea eax, [ebp - 0x104]
cmp dword [ebp - 0x108], eax
je 0x1029965
push dword [ebp - 0x108]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x114], 0
je 0x1029983
push dword [ebp - 0x114]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x120]
mov dword [esi + 4], eax
push dword [ebp - 0x118]
call dword [sym.imp.API_MS_Win_Core_LocalRegistry_L1_1_0.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.010024b0
leave
ret 4