Function at 0x401210
Capabilities:
Query or enumerate registry key

Disassembly:
push 0xffffffffffffffff
push 0x40b8b8
mov eax, dword fs:[0]
push eax
sub esp, 0x224
mov eax, dword [0x410050]
xor eax, esp
mov dword [esp + 0x220], eax
push ebx
push esi
push edi
mov eax, dword [0x410050]
xor eax, esp
push eax
lea eax, [esp + 0x234]
mov dword fs:[0], eax
mov ecx, dword [esp + 0x244]
mov dword [esp + 0x20], ecx
mov esi, dword [esp + 0x264]
xor ebx, ebx
mov dword [esp + 0x23c], ebx
mov dword [esp + 0x18], 0xf003f
cmp esi, 0x20
jne 0x40127c
mov dword [esp + 0x18], 0xf023f
jmp 0x401289
cmp esi, 0x40
jne 0x401289
mov dword [esp + 0x18], 0xf013f
mov eax, dword [esp + 0x24c]
mov edi, 8
cmp dword [esp + 0x260], edi
jae 0x4012a5
lea eax, [esp + 0x24c]
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x1c]
push edx
push ebx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x4012dc
cmp dword [esp + 0x260], edi
jb 0x4012d5
mov eax, dword [esp + 0x24c]
push eax
call fcn.00404353
add esp, 4
xor al, al
jmp 0x401467
push 0x206
lea edx, [esp + 0x2e]
xor ecx, ecx
push ebx
push edx
mov word [esp + 0x34], cx
call fcn.00404d90
mov edx, dword [esp + 0x20]
mov edi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
add esp, 0xc
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x3c]
push ecx
push ebx
push edx
mov dword [esp + 0x3c], 0x104
call edi
test eax, eax
jne 0x4013ac
jmp 0x40132b
mov esi, dword [esp + 0x264]
push esi
sub esp, 0x1c
mov esi, esp
xor eax, eax
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], ebx
mov word [esi + 4], ax
lea eax, [esp + 0x48]
mov dword [esp + 0x44], esp
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401350
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x4c]
call fcn.00402aa0
mov ecx, dword [esp + 0x34]
push ecx
call fcn.00401210
push 0x208
lea edx, [esp + 0x50]
push ebx
push edx
mov dword [esp + 0x4c], 0x104
call fcn.00404d90
mov edx, dword [esp + 0x44]
add esp, 0x30
push ebx
push ebx
push ebx
push ebx
lea eax, [esp + 0x2c]
push eax
lea ecx, [esp + 0x3c]
push ecx
push ebx
push edx
call edi
test eax, eax
je 0x401324
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push str.AdvAPI32.dll
mov byte [esp + 0x17], bl
xor edi, edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
cmp esi, ebx
je 0x40141d
push str.RegDeleteKeyEx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x401412
cmp dword [esp + 0x260], 8
mov ecx, dword [esp + 0x24c]
mov edi, 1
jae 0x4013fb
lea ecx, [esp + 0x24c]
mov edx, dword [esp + 0x18]
push ebx
push edx
push ecx
mov ecx, dword [esp + 0x2c]
push ecx
call eax
test eax, eax
jne 0x401412
mov byte [esp + 0x13], 1
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp edi, ebx
jne 0x401447
cmp dword [esp + 0x260], 8
mov eax, dword [esp + 0x24c]
jae 0x401435
lea eax, [esp + 0x24c]
mov edx, dword [esp + 0x20]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov bl, 1
test eax, eax
je 0x40144b
mov bl, byte [esp + 0x13]
cmp dword [esp + 0x260], 8
jb 0x401465
mov eax, dword [esp + 0x24c]
push eax
call fcn.00404353
add esp, 4
mov al, bl
mov ecx, dword [esp + 0x234]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x220]
xor ecx, esp
call fcn.0040415a
add esp, 0x230
ret