Function at 0x407370
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x437603
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x442308]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x18]
mov edi, dword [ebp + 0x1c]
mov dword [ebp - 0x41c], eax
xor eax, eax
mov dword [ebp - 0x428], eax
xor edx, edx
mov dword [esi + 0x18], 7
mov dword [esi + 0x14], eax
mov dword [ebp - 0x430], esi
mov dword [ebp - 0x420], ecx
mov word [esi + 4], dx
push 0x3fe
push eax
lea edx, [ebp - 0x40e]
mov dword [ebp - 4], eax
xor ecx, ecx
push edx
mov dword [ebp - 0x428], 1
mov word [ebp - 0x410], cx
call fcn.00423660
xor ecx, ecx
add esp, 0xc
cmp edi, ecx
je 0x40742a
mov eax, edi
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407410
sub eax, edx
sar eax, 1
push eax
push edi
mov ecx, esi
call fcn.00401820
xor ecx, ecx
mov edi, dword [ebp - 0x41c]
cmp edi, ecx
je 0x407693
mov eax, dword [ebp - 0x420]
mov dword [ebp - 0x414], ecx
mov dword [ebp - 0x418], ecx
cmp eax, ecx
je 0x4075a7
cmp word [eax], cx
je 0x4075a7
lea edx, [ebp - 0x41c]
push edx
mov edx, dword [ebp + 0x14]
or edx, 0x20019
push edx
push ecx
push eax
push edi
mov dword [ebp - 0x41c], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407693
mov eax, dword [ebp - 0x41c]
mov dword [ebp - 0x424], eax
lea ecx, [ebp - 0x414]
push ecx
push 0
lea edx, [ebp - 0x418]
push edx
push 0
push ebx
mov dword [ebp - 4], 1
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
call edi
test eax, eax
jne 0x407595
mov eax, dword [ebp - 0x418]
cmp eax, 1
je 0x4074ce
cmp eax, 2
jne 0x407595
mov eax, dword [ebp - 0x414]
cmp eax, 0x400
ja 0x407526
lea eax, [ebp - 0x414]
push eax
mov eax, dword [ebp - 0x41c]
lea ecx, [ebp - 0x410]
push ecx
lea edx, [ebp - 0x418]
push edx
push 0
push ebx
push eax
mov dword [ebp - 0x414], 0x400
call edi
lea ecx, [ebp - 0x410]
push ecx
mov ecx, esi
call fcn.004015d0
mov edx, dword [ebp - 0x424]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x407693
shr eax, 1
xor ecx, ecx
mov edi, eax
mov edx, 2
mul edx
seto cl
mov dword [ebp - 0x420], edi
neg ecx
or ecx, eax
push ecx
call fcn.004235a6
mov edi, eax
add esp, 4
mov dword [ebp - 0x42c], edi
mov byte [ebp - 4], 2
test edi, edi
je 0x40758c
mov edx, dword [ebp - 0x41c]
lea eax, [ebp - 0x414]
push eax
push edi
lea ecx, [ebp - 0x418]
push ecx
push 0
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [ebp - 0x420]
xor eax, eax
mov word [edi + ecx*2], ax
push edi
mov ecx, esi
call fcn.004015d0
push edi
call fcn.0042362c
add esp, 4
mov edx, dword [ebp - 0x424]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x407693
lea eax, [ebp - 0x414]
push eax
push ecx
lea edx, [ebp - 0x418]
push edx
push ecx
push ebx
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x407693
mov eax, dword [ebp - 0x418]
cmp eax, 1
je 0x4075db
cmp eax, 2
jne 0x407693
mov eax, dword [ebp - 0x414]
cmp eax, 0x400
ja 0x407621
lea eax, [ebp - 0x414]
push eax
lea ecx, [ebp - 0x410]
push ecx
lea edx, [ebp - 0x418]
push edx
push 0
push ebx
push edi
mov dword [ebp - 0x414], 0x400
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x410]
push eax
mov ecx, esi
call fcn.004015d0
jmp 0x407693
shr eax, 1
xor ecx, ecx
mov edi, eax
mov edx, 2
mul edx
seto cl
mov dword [ebp - 0x424], edi
neg ecx
or ecx, eax
push ecx
call fcn.004235a6
mov edi, eax
add esp, 4
mov dword [ebp - 0x42c], edi
mov dword [ebp - 4], 3
test edi, edi
je 0x40768a
mov edx, dword [ebp - 0x41c]
lea eax, [ebp - 0x414]
push eax
push edi
lea ecx, [ebp - 0x418]
push ecx
push 0
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ecx, dword [ebp - 0x424]
xor eax, eax
mov word [edi + ecx*2], ax
push edi
mov ecx, esi
call fcn.004015d0
push edi
call fcn.0042362c
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042364d
mov esp, ebp
pop ebp
ret 0x18