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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
xor edi, edi
push edi
push edi
push edi
push edi
mov ebx, ecx
lea eax, [ebp - 0xc]
push eax
lea esi, [ebx + 0xaecc]
push esi
push dword [ebp + 0xc]
mov dword [ebp - 0xc], 0x105
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
cmp eax, edi
mov dword [ebp - 8], eax
jne 0x40b3f8
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x14]
push dword [eax]
mov dword [ebp - 4], edi
push edi
push esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
je 0x40b1b9
push esi
push 0x404510
lea eax, [ebx + 0xb2e0]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x42000
lea eax, [ebx + 0xb2e0]
push eax
push dword [ebx + 0xa27c]
mov ecx, ebx
call fcn.00409cc1
jmp 0x40b3e5
lea ecx, [ebp - 0x10]
push ecx
lea eax, [ebx + 0xb0d6]
push eax
lea eax, [ebp - 0x14]
push eax
push 0
push 0x403dec
push dword [ebp - 4]
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x10], 0x20a
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp edi, 2
jne 0x40b1f4
xor edi, edi
jmp 0x40b3e5
test edi, edi
je 0x40b200
push esi
push 0x4043d0
jmp 0x40b18b
and word [esi], 0
push 0x105
push esi
lea eax, [ebx + 0xb0d6]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
mov dword [ebp - 8], eax
je 0x40b244
cmp word [ebx + eax*2 + 0xaeca], 0x5c
je 0x40b244
mov word [ebx + eax*2 + 0xaecc], 0x5c
inc eax
and word [ebx + eax*2 + 0xaecc], 0
mov ecx, 0x104
sub ecx, eax
cmp dword [0x4177cc], 2
push ecx
lea eax, [ebx + eax*2 + 0xaecc]
jne 0x40b263
push 0x403e10
jmp 0x40b268
push 0x403e28
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
push esi
call dword [eax + 0x14]
push eax
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegLoadKeyW]
mov edi, eax
test edi, edi
jne 0x40b397
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
call dword [eax + 0x18]
mov ecx, dword [ebx + 4]
mov edi, eax
mov eax, dword [ecx]
mov dword [ebp + 8], edi
call dword [eax + 0x14]
mov ecx, edi
mov esi, eax
mov eax, dword [ebp + 8]
lea edi, [ebx + 0xb0d6]
rep movsw word es:[edi], word [esi]
cmp word [ebx + eax*2 + 0xb0d4], 0x5c
je 0x40b2c9
mov word [ebx + eax*2 + 0xb0d6], 0x5c
inc eax
mov ecx, 0x104
sub ecx, eax
push ecx
push dword [ebp + 0x10]
lea eax, [ebx + eax*2 + 0xb0d6]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
and dword [ebp + 0xc], 0
lea eax, [ebp + 0xc]
push eax
mov eax, dword [ebp + 0x14]
push dword [eax]
lea esi, [ebx + 0xb0d6]
push 0
push esi
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
jne 0x40b335
cmp dword [0x4177cc], 2
mov ecx, ebx
jne 0x40b331
mov eax, dword [ebp - 8]
and word [ebx + eax*2 + 0xaecc], di
lea eax, [ebx + 0xaecc]
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [ebp + 0x18]
jmp 0x40b386
push 0
jmp 0x40b326
cmp edi, 2
lea eax, [ebx + 0xb2e0]
jne 0x40b356
push dword [ebp + 0x10]
push 0x404318
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
xor edi, edi
jmp 0x40b386
lea ecx, [ebx + 0xaecc]
push ecx
push esi
push 0x4042e0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 0x42000
lea eax, [ebx + 0xb2e0]
push eax
push dword [ebx + 0xa27c]
mov ecx, ebx
call fcn.00409cc1
cmp dword [ebp + 0xc], 0
je 0x40b3cf
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40b3cf
cmp edi, 0x20
jne 0x40b3a0
xor edi, edi
jmp 0x40b3cf
push esi
lea eax, [ebx + 0xb2e0]
push 0x4044c0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x42000
lea eax, [ebx + 0xb2e0]
push eax
push dword [ebx + 0xa27c]
mov ecx, ebx
call fcn.00409cc1
mov ebx, dword [ebx + 4]
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x14]
push eax
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegUnLoadKeyW]
cmp dword [ebp - 4], 0
je 0x40b3f4
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
jmp 0x40b42e
mov eax, 0x103
cmp dword [ebp - 8], eax
je 0x40b42e
push esi
lea edi, [ebx + 0xb2e0]
push 0x404470
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
push 0x42000
push edi
push dword [ebx + 0xa27c]
mov ecx, ebx
call fcn.00409cc1
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
leave
ret 0x14