Function at 0x407481
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x40900c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x224]
push eax
push 0x101
xor ebx, ebx
push ebx
push 0x40320c
push dword [0x40b258]
mov dword [ebp - 0x224], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, 0x4031b0
mov esi, 0x402d00
cmp eax, ebx
jne 0x40759c
mov ebx, 0x409024
lea ecx, [ebp - 0x214]
push ecx
lea ecx, [ebp - 0x218]
push ecx
xor eax, eax
lea ecx, [ebp - 0x21c]
push ecx
push eax
push dword [ebx]
mov dword [ebp - 0x21c], eax
push dword [ebp - 0x224]
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x214], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x407559
cmp dword [ebp - 0x21c], 4
jne 0x407559
cmp dword [ebp - 0x214], 4
jne 0x407559
cmp byte [0x40b24e], 0
mov eax, dword [ebp - 0x218]
mov dword [ebx + 4], eax
je 0x40757d
push eax
push dword [ebx]
push 0x403178
push 0
push edi
push 0x10a
push esi
push 3
push 2
call fcn.004040cf
add esp, 0x24
jmp 0x40757d
cmp byte [0x40b24e], 0
je 0x40757d
push dword [ebx]
push 0x403130
push eax
push edi
push 0x114
push esi
push 1
push 2
call fcn.004040cf
add esp, 0x20
add ebx, 0xc
cmp ebx, 0x409120
jl 0x4074d6
push dword [ebp - 0x224]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
jmp 0x4075bd
cmp byte [0x40b24e], bl
je 0x4075bd
push 0x4030f4
push eax
push edi
push 0x11f
push esi
push 1
push 2
call fcn.004040cf
add esp, 0x1c
lea eax, [ebp - 0x220]
push eax
push 0x101
push ebx
push 0x4030e4
push dword [0x40b258]
mov dword [ebp - 0x220], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x40789a
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x21c]
push eax
push ebx
push 0x4030c8
push dword [ebp - 0x220]
mov dword [ebp - 0x218], 0x20a
mov dword [ebp - 0x21c], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x407722
cmp dword [ebp - 0x21c], 1
jne 0x407722
xor eax, eax
mov word [ebp - 8], ax
lea eax, [ebp - 0x210]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x407644
sub eax, edx
sar eax, 1
lea ebx, [eax + 1]
cmp ebx, 1
jbe 0x407707
cmp word [ebp + ebx*2 - 0x212], 0x5c
jne 0x40766a
dec ebx
cmp ebx, 1
jbe 0x407707
lea eax, [ebx + ebx]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x228], eax
test eax, eax
je 0x4076ec
lea ecx, [ebp - 0x210]
push ecx
push ebx
push eax
call fcn.004035b8
mov ebx, 0x40b284
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [0x40b248]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [ebp - 0x228]
push ebx
mov dword [0x40b248], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [0x40b24e], 0
je 0x407744
push dword [0x40b248]
push 0x40308c
push 0
push edi
push 0x156
push esi
push 3
push 2
call fcn.004040cf
add esp, 0x20
jmp 0x407744
cmp byte [0x40b24e], 0
je 0x407744
push 0x40304c
push 0x8007000e
push edi
push 0x15f
jmp 0x407737
cmp byte [0x40b24e], 0
je 0x407744
push 0x403000
push 0x80070057
push edi
push 0x169
jmp 0x407737
cmp byte [0x40b24e], 0
je 0x407744
push 0x402fcc
push eax
push edi
push 0x171
push esi
push 1
push 2
call fcn.004040cf
add esp, 0x1c
push 4
pop ebx
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x21c]
push eax
push 0
push 0x402fa8
push dword [ebp - 0x220]
mov dword [ebp - 0x218], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4077cd
cmp dword [ebp - 0x21c], ebx
jne 0x4077cd
cmp dword [ebp - 0x218], ebx
jne 0x4077cd
mov eax, 0x1fffffff
cmp dword [ebp - 0x214], eax
jbe 0x40779c
mov dword [ebp - 0x214], eax
cmp byte [0x40b24e], 0
mov eax, dword [ebp - 0x214]
mov dword [0x409154], eax
je 0x4077ef
push eax
push 0x402f6c
push 0
push edi
push 0x18e
push esi
push 3
push 2
call fcn.004040cf
add esp, 0x20
jmp 0x4077ef
cmp byte [0x40b24e], 0
je 0x4077ef
push 0x402f28
push eax
push edi
push 0x197
push esi
push 1
push 2
call fcn.004040cf
add esp, 0x1c
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x21c]
push eax
push 0
push 0x402f04
push dword [ebp - 0x220]
mov dword [ebp - 0x218], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40786a
cmp dword [ebp - 0x21c], ebx
jne 0x40786a
cmp dword [ebp - 0x218], ebx
jne 0x40786a
cmp dword [ebp - 0x214], eax
setne al
cmp byte [0x40b24e], 0
mov byte [0x40b24c], al
je 0x40788c
push dword [ebp - 0x214]
push 0x402ecc
push 0
push edi
push 0x1ad
push esi
push 3
push 2
call fcn.004040cf
add esp, 0x20
jmp 0x40788c
cmp byte [0x40b24e], 0
je 0x40788c
push 0x402e88
push eax
push edi
push 0x1b6
push esi
push 1
push 2
call fcn.004040cf
add esp, 0x1c
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4078bc
cmp byte [0x40b24e], 0
je 0x4078bc
push 0x402e54
push eax
push edi
push 0x1c0
push esi
push 1
push 2
call fcn.004040cf
add esp, 0x1c
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403f0d
leave
ret