Function at 0x40b570
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x50
cmp dword [0x415424], 0
je 0x40b8d4
mov eax, dword [ebp + 8]
push eax
call fcn.0040ac60
mov dword [ebp - 0x38], eax
cmp dword [ebp + 0xc], 0
je 0x40b5a1
mov ecx, dword [ebp + 0xc]
movzx edx, word [ecx]
test edx, edx
jne 0x40b5a8
mov dword [ebp + 0xc], 0x413860
mov dword [ebp - 0x1c], 0x3f4
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0040b090
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40b8c0
mov edx, dword [ebp - 0xc]
push edx
call fcn.0040a810
test eax, eax
jne 0x40b8a4
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 0x413864
mov ecx, dword [ebp - 0xc]
push ecx
call dword [sym.imp.MSVCR100.dll__swscanf_s_l]
add esp, 0x10
cmp eax, 1
jne 0x40b637
mov dword [ebp - 0x28], 4
mov dword [ebp - 0x14], 4
lea edx, [ebp - 0x34]
mov dword [ebp - 0x24], edx
jmp 0x40b853
mov dword [ebp - 0x10], 0
push 4
push str.hex:
push 4
mov eax, dword [ebp - 0xc]
push eax
call fcn.0040a860
movzx ecx, al
test ecx, ecx
je 0x40b667
mov dword [ebp - 0x10], 4
mov dword [ebp - 0x28], 3
jmp 0x40b6d0
push 4
push str.hex_
push 4
mov edx, dword [ebp - 0xc]
push edx
call fcn.0040a860
movzx eax, al
test eax, eax
je 0x40b6d0
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 0x40b6d0
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 0x40b6c1
mov eax, dword [ebp - 0x10]
add eax, 1
mov dword [ebp - 0x10], eax
jmp 0x40b6a7
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 0x40b814
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 0x40b6e9
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 0x40b7ae
mov edx, dword [ebp - 0x18]
movzx eax, word [edx]
cmp eax, 0x2c
je 0x40b778
mov ecx, dword [ebp - 0x18]
movzx edx, word [ecx]
test edx, edx
je 0x40b778
mov eax, dword [ebp - 0x18]
add eax, 2
mov dword [ebp - 0x18], eax
jmp 0x40b758
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 0x40b7a0
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 0x40b7ac
jmp 0x40b7ae
jmp 0x40b737
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0x20]
je 0x40b7bd
mov dword [ebp - 0x1c], 0xd
cmp dword [ebp - 0x1c], 0
jne 0x40b812
cmp dword [ebp - 0x28], 1
je 0x40b7d5
cmp dword [ebp - 0x28], 7
je 0x40b7d5
cmp dword [ebp - 0x28], 2
jne 0x40b812
mov eax, dword [ebp - 0x14]
xor edx, edx
mov ecx, 2
div ecx
test edx, edx
jne 0x40b80b
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 0x40b812
mov dword [ebp - 0x1c], 0xd
jmp 0x40b853
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 0x40b823
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 0x40b8a2
cmp dword [ebp + 0x18], 0
je 0x40b886
mov edx, dword [ebp + 0x1c]
mov eax, dword [edx]
cmp eax, dword [ebp - 0x14]
jb 0x40b87f
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 0x40b886
mov dword [ebp - 0x1c], 0xea
cmp dword [ebp + 0x14], 0
je 0x40b894
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp - 0x28]
mov dword [ecx], edx
cmp dword [ebp + 0x1c], 0
je 0x40b8a2
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
jmp 0x40b8ab
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 0x40b8c7
mov dword [ebp - 0x1c], 8
mov eax, dword [ebp - 0x1c]
push eax
call fcn.0040a8a0
jmp 0x40b8f2
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