Function at 0x4051e0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1b0
mov eax, dword [0x464024]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, dword [ebp + 8]
mov ecx, 0xf013f
push esi
xor esi, esi
mov dword [ebp - 0x1a4], ebx
cmp dword [0x46a5cc], esi
mov eax, 0xf003f
push edi
cmovne eax, ecx
lea ecx, [ebp - 0x1ac]
push ecx
push eax
push esi
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x405251
push eax
push str.ERROR_0x_x_n
call fcn.004020b0
add esp, 8
mov eax, 0x449958
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041ae8f
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x1a0]
push eax
push 0
push 0
push 0
push ebx
push dword [ebp - 0x1ac]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
call ebx
test eax, eax
jne 0x405291
push dword [ebp - 0x1a0]
call fcn.00427ea0
mov edi, eax
add esp, 4
mov dword [ebp - 0x1a8], edi
test edi, edi
jne 0x4052b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.ERROR_0x_x_n
call fcn.004020b0
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0041ae8f
mov esp, ebp
pop ebp
ret
push str.RegQueryValueEx...
call fcn.004020b0
add esp, 4
lea eax, [ebp - 0x1a0]
push eax
push edi
lea eax, [ebp - 0x1b0]
push eax
push 0
push dword [ebp - 0x1a4]
push dword [ebp - 0x1ac]
call ebx
test eax, eax
jne 0x405291
push str.SUCCESS_n
call fcn.004020b0
mov eax, dword [ebp - 0x1b0]
add esp, 4
dec eax
cmp eax, 6
ja case.0x4052ff.3
jmp dword [eax*4 + 0x405544]
mov eax, dword [ebp - 0x1a0]
test eax, eax
je 0x405328
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x405515
push 0x449958
push 0
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x405515
mov eax, dword [ebp - 0x1a0]
cmp eax, 2
jb 0x405328
lea eax, [eax*2 + 2]
mov ebx, edi
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [ebp - 0x1a4], ecx
test ecx, ecx
je 0x405328
xor eax, eax
mov word [ecx], ax
cmp word [edi], ax
je 0x4053f6
mov edx, ebx
mov esi, ebx
nop dword [eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x405380
sub edx, esi
lea edi, [ecx - 2]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x405390
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x1a4]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x4053b3
mov eax, dword [0x45d094]
mov dword [edi], eax
mov eax, ebx
lea edx, [eax + 2]
nop dword [eax + eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4053d0
sub eax, edx
sar eax, 1
lea ebx, [ebx + eax*2]
add ebx, 2
cmp word [ebx], cx
mov ecx, dword [ebp - 0x1a4]
jne 0x405378
mov edi, dword [ebp - 0x1a8]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, dword [ebp - 0x1a4]
jmp 0x4054fb
cmp dword [ebp - 0x1a0], 4
jne 0x405435
mov eax, dword [edi]
push eax
push eax
lea eax, [ebp - 0x19c]
push 0x45d098
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea eax, [ebp - 0x19c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
lea eax, [ebp - 0x19c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
jmp 0x405515
mov eax, dword [ebp - 0x1a0]
test eax, eax
je 0x405515
lea eax, [eax + eax*2]
lea eax, [eax*2 + 2]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, dword [ebp - 0x1a0]
mov ebx, eax
xor esi, esi
mov dword [ebp - 0x1a4], ebx
test ecx, ecx
je 0x4054e0
mov edi, ebx
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
nop word [eax + eax]
mov eax, dword [ebp - 0x1a8]
movzx eax, byte [esi + eax]
push eax
push str._02X
push edi
call ebx
mov ecx, dword [ebp - 0x1a0]
inc esi
add esp, 0xc
add edi, 6
cmp esi, ecx
jb 0x4054b0
mov ebx, dword [ebp - 0x1a4]
mov edi, dword [ebp - 0x1a8]
lea eax, [ecx + ecx*2]
xor ecx, ecx
push ebx
mov word [ebx + eax*2], cx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push ebx
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push edi
call fcn.00427d8b
mov eax, dword [ebp - 0x1ac]
add esp, 4
test eax, eax
je 0x40552f
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 8]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041ae8f
mov esp, ebp
pop ebp
ret