Function at 0x405eb0
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x50
cmp dword [0x409380], 0
je 0x406214
mov eax, dword [ebp + 8]
push eax
call fcn.004055a0
mov dword [ebp - 0x38], eax
cmp dword [ebp + 0xc], 0
je 0x405ee1
mov ecx, dword [ebp + 0xc]
movzx edx, word [ecx]
test edx, edx
jne 0x405ee8
mov dword [ebp + 0xc], 0x407c00
mov dword [ebp - 0x1c], 0x3f4
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.004059d0
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x406200
mov edx, dword [ebp - 0xc]
push edx
call fcn.00405150
test eax, eax
jne 0x4061e4
mov dword [ebp - 0x34], 0
mov byte [ebp - 1], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x1c], 0
lea eax, [ebp - 0x34]
push eax
push 0
push 0x407c04
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.MSVCR100.dll__swscanf_s_l]
add esp, 0x10
cmp eax, 1
jne 0x405f77
mov dword [ebp - 0x28], 4
mov dword [ebp - 0x14], 4
lea edx, [ebp - 0x34]
mov dword [ebp - 0x24], edx
jmp 0x406193
mov dword [ebp - 0x10], 0
push 4
push str.hex:
push 4
mov eax, dword [ebp - 0xc]
push eax
call fcn.004051a0
movzx ecx, al
test ecx, ecx
je 0x405fa7
mov dword [ebp - 0x10], 4
mov dword [ebp - 0x28], 3
jmp 0x406010
push 4
push str.hex_
push 4
mov edx, dword [ebp - 0xc]
push edx
call fcn.004051a0
movzx eax, al
test eax, eax
je 0x406010
lea ecx, [ebp - 0x3c]
push ecx
push 0
push str._d_:
mov edx, dword [ebp - 0xc]
add edx, 8
push edx
call dword [sym.imp.MSVCR100.dll__swscanf_s_l]
add esp, 0x10
cmp eax, 1
jne 0x406010
mov dword [ebp - 0x10], 4
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
movzx edx, word [ecx + eax*2]
cmp edx, 0x3a
je 0x406001
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
jmp 0x405fe7
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x28], edx
cmp dword [ebp - 0x10], 0
je 0x406154
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
add ecx, 2
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x2c]
mov ax, word [edx]
mov word [ebp - 4], ax
add dword [ebp - 0x2c], 2
cmp word [ebp - 4], 0
jne 0x406029
mov ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x40]
sar ecx, 1
mov dword [ebp - 0x44], ecx
mov eax, dword [ebp - 0x44]
sub eax, dword [ebp - 0x10]
xor edx, edx
mov ecx, 3
div ecx
add eax, 1
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
lea edx, [ecx + eax*2]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x20], 0
lea eax, [ebp - 0x34]
push eax
push 0
push str._08x
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.MSVCR100.dll__swscanf_s_l]
add esp, 0x10
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 1
jne 0x4060ee
mov edx, dword [ebp - 0x18]
movzx eax, word [edx]
cmp eax, 0x2c
je 0x4060b8
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx]
test edx, edx
je 0x4060b8
mov eax, dword [ebp - 0x18]
add eax, 2
mov dword [ebp - 0x18], eax
jmp 0x406098
mov ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x20]
mov dl, byte [ebp - 0x34]
mov byte [ecx], dl
mov eax, dword [ebp - 0x20]
add eax, 1
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx]
cmp edx, 0x2c
jne 0x4060e0
mov eax, dword [ebp - 0x18]
add eax, 2
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx]
test edx, edx
jne 0x4060ec
jmp 0x4060ee
jmp 0x406077
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x20]
je 0x4060fd
mov dword [ebp - 0x1c], 0xd
cmp dword [ebp - 0x1c], 0
jne 0x406152
cmp dword [ebp - 0x28], 1
je 0x406115
cmp dword [ebp - 0x28], 7
je 0x406115
cmp dword [ebp - 0x28], 2
jne 0x406152
mov eax, dword [ebp - 0x14]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x40614b
mov edx, dword [ebp - 0x14]
add edx, 2
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 0x24]
add eax, dword [ebp - 0x20]
mov byte [eax], 0
mov ecx, dword [ebp - 0x20]
add ecx, 1
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x24]
add edx, dword [ebp - 0x20]
mov byte [edx], 0
jmp 0x406152
mov dword [ebp - 0x1c], 0xd
jmp 0x406193
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x30]
add ecx, 2
mov dword [ebp - 0x4c], ecx
mov edx, dword [ebp - 0x30]
mov ax, word [edx]
mov word [ebp - 6], ax
add dword [ebp - 0x30], 2
cmp word [ebp - 6], 0
jne 0x406163
mov ecx, dword [ebp - 0x30]
sub ecx, dword [ebp - 0x4c]
sar ecx, 1
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
lea eax, [edx + edx + 2]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x24], ecx
cmp dword [ebp - 0x1c], 0
jne 0x4061e2
cmp dword [ebp + 0x18], 0
je 0x4061c6
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx]
cmp eax, dword [ebp - 0x14]
jb 0x4061bf
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp + 0x18]
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
jmp 0x4061c6
mov dword [ebp - 0x1c], 0xea
cmp dword [ebp + 0x14], 0
je 0x4061d4
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x28]
mov dword [ecx], edx
cmp dword [ebp + 0x1c], 0
je 0x4061e2
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
jmp 0x4061eb
mov dword [ebp - 0x1c], 2
mov edx, dword [ebp - 0xc]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x406207
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
push eax
call fcn.004051e0
jmp 0x406232
mov ecx, dword [ebp + 0x1c]
push ecx
mov edx, dword [ebp + 0x18]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esp, ebp
pop ebp
ret 0x18