Function at 0x40d460
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4d496e
mov eax, dword fs:[0]
push eax
sub esp, 0x464
mov eax, dword [0x50f880]
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 + 8]
mov edi, ecx
mov dword [ebp - 0x468], edi
mov dword [ebp - 0x464], eax
xor ebx, ebx
lea esi, [ebp + 0xc]
mov dword [ebp - 4], ebx
call fcn.0040e640
test al, al
je 0x40d4c7
mov ecx, dword [ebp - 0x464]
push 0x80000001
push ecx
push edi
call fcn.0040f690
jmp 0x40d724
mov esi, 7
xor ecx, ecx
xor edi, edi
mov dword [ebp - 0x45c], 0x104
mov dword [ebp - 0x428], esi
mov dword [ebp - 0x42c], ebx
mov word [ebp - 0x43c], cx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
lea edx, [ebp - 0x46c]
push edx
push ebx
push ebx
push ebx
push 0x80000003
mov byte [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
lea ecx, [ecx]
push ebx
push ebx
push ebx
push ebx
lea eax, [ebp - 0x45c]
push eax
lea ecx, [ebp - 0x218]
push ecx
push edi
push 0x80000003
mov dword [ebp - 0x45c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
inc edi
xor edx, edx
lea eax, [ebp - 0x218]
mov word [ebp - 0x458], dx
mov dword [ebp - 0x444], esi
mov dword [ebp - 0x448], ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40d557
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x458]
call fcn.00417a80
cmp dword [ebp - 0x428], 8
jb 0x40d591
mov ecx, dword [ebp - 0x43c]
push ecx
call fcn.00453bd6
add esp, 4
xor edx, edx
cmp dword [ebp - 0x444], 8
mov dword [ebp - 0x428], esi
mov dword [ebp - 0x42c], ebx
mov word [ebp - 0x43c], dx
jae 0x40d5d2
mov eax, dword [ebp - 0x448]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [ebp - 0x458]
push edx
lea eax, [ebp - 0x43c]
push eax
call fcn.00454320
add esp, 0xc
jmp 0x40d5e4
mov ecx, dword [ebp - 0x458]
mov dword [ebp - 0x43c], ecx
mov dword [ebp - 0x458], ebx
mov edx, dword [ebp - 0x448]
mov eax, dword [ebp - 0x444]
mov byte [ebp - 4], 1
xor ecx, ecx
push 0x15
mov word [ebp - 0x458], cx
push str.Volatile_Environment
lea ecx, [ebp - 0x43c]
mov dword [ebp - 0x42c], edx
mov dword [ebp - 0x428], eax
mov dword [ebp - 0x444], esi
mov dword [ebp - 0x448], ebx
call fcn.00415aa0
cmp dword [ebp - 0x428], 8
mov eax, dword [ebp - 0x43c]
jae 0x40d63c
lea eax, [ebp - 0x43c]
lea edx, [ebp - 0x460]
push edx
push 0x20019
push ebx
push eax
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x40d6d1
mov edx, dword [ebp - 0x460]
lea eax, [ebp - 0x45c]
push eax
lea ecx, [ebp - 0x420]
push ecx
push ebx
push ebx
push str.USERNAME
push edx
mov dword [ebp - 0x45c], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jl 0x40d6df
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x420]
mov si, word [ecx]
cmp si, word [edx]
jne 0x40d6b8
cmp si, bx
je 0x40d6b4
mov si, word [ecx + 2]
cmp si, word [edx + 2]
jne 0x40d6b8
add ecx, 4
add edx, 4
cmp si, bx
jne 0x40d692
xor ecx, ecx
jmp 0x40d6bd
sbb ecx, ecx
sbb ecx, 0xffffffff
cmp ecx, ebx
sete cl
cmp cl, bl
jne 0x40d768
mov esi, 7
cmp eax, ebx
jl 0x40d6df
cmp edi, dword [ebp - 0x46c]
jbe 0x40d510
mov ecx, dword [ebp - 0x464]
mov edx, dword [ebp - 0x468]
push 0x80000001
push ecx
push edx
call fcn.0040f690
cmp dword [ebp - 0x428], 8
jb 0x40d70f
mov eax, dword [ebp - 0x43c]
push eax
call fcn.00453bd6
add esp, 4
xor ecx, ecx
mov dword [ebp - 0x428], esi
mov dword [ebp - 0x42c], ebx
mov word [ebp - 0x43c], cx
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
or ecx, 0xffffffff
lea edx, [eax + 0xc]
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d74a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.00453be1
mov esp, ebp
pop ebp
ret 8
lea eax, [ebp - 0x460]
push eax
push 0x20019
push ebx
lea ecx, [ebp - 0x218]
push ecx
push 0x80000003
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edx, dword [ebp - 0x460]
mov eax, dword [ebp - 0x464]
mov ecx, dword [ebp - 0x468]
push edx
push eax
push ecx
call fcn.0040f690
cmp dword [ebp - 0x428], 8
jb 0x40d7b9
mov edx, dword [ebp - 0x43c]
push edx
call fcn.00453bd6
add esp, 4
xor eax, eax
mov word [ebp - 0x43c], ax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
mov dword [ebp - 0x428], 7
mov dword [ebp - 0x42c], ebx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x40d73e