Function at 0x478b60
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fecfb
mov eax, dword fs:[0]
push eax
sub esp, 0x160
mov eax, dword [0x53d058]
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 ebx, edx
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x18]
push eax
push 0x201
push 0
push ebx
push ecx
mov dword [ebp - 0x18], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test edi, edi
je 0x478c32
push str.GetRegKeyValue
mov edx, 4
lea ecx, [ebp - 0xc4]
call fcn.0040fef0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 0
mov al, byte [esi + 0x48]
test al, al
je 0x478c20
mov edx, str.RegOpenKeyEx
mov ecx, esi
call fcn.004151c0
mov al, byte [esi + 0x48]
test al, al
je 0x478c20
push ebx
push esi
call fcn.00414f60
mov al, byte [esi + 0x48]
add esp, 8
test al, al
je 0x478c20
mov edx, str._failed
mov ecx, esi
call fcn.004151c0
mov al, byte [esi + 0x48]
test al, al
je 0x478c20
push edi
mov ecx, esi
call fcn.00413060
lea ecx, [ebp - 0xc4]
call fcn.0040fdc0
xor al, al
jmp 0x478cd1
mov edi, dword [esi + 4]
mov edx, edi
mov ecx, dword [esi]
sub edx, ecx
cmp edx, 0x7fff
jbe 0x478c4b
lea edi, [ecx + 0x7fff]
jmp 0x478c83
jae 0x478c86
mov eax, dword [esi + 8]
sub eax, ecx
cmp eax, 0x7fff
jae 0x478c6b
push ecx
push 0x7fff
mov ecx, esi
call fcn.0045f8b0
mov edi, dword [esi + 4]
jmp 0x478c86
mov ecx, 0x7fff
mov eax, edi
sub ecx, edx
push ecx
push 0
push eax
lea edi, [eax + ecx]
call fcn.004cdf10
add esp, 0xc
mov dword [esi + 4], edi
mov eax, dword [esi]
lea ecx, [ebp - 0x14]
push ecx
push eax
push 0
sub edi, eax
push 0
mov dword [ebp - 0x14], edi
mov edi, dword [ebp - 0x1c]
push edi
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x478d19
mov ebx, dword [esi + 4]
mov ecx, ebx
mov edx, dword [esi]
sub ecx, edx
mov edi, dword [ebp - 0x14]
cmp edi, ecx
jae 0x478ced
lea eax, [edx + edi]
mov dword [esi + 4], eax
mov edi, dword [ebp - 0x1c]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
sete al
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.0049852a
mov esp, ebp
pop ebp
ret
jbe 0x478cc0
mov eax, dword [esi + 8]
sub eax, edx
cmp edi, eax
jbe 0x478d06
push ecx
push edi
mov ecx, esi
lfence
call fcn.0045f8b0
jmp 0x478cc0
sub edi, ecx
push edi
push 0
push ebx
call fcn.004cdf10
add esp, 0xc
lea eax, [edi + ebx]
jmp 0x478cbd
push str.GetRegKeyValue
mov edx, 4
lea ecx, [ebp - 0x16c]
call fcn.0040fef0
add esp, 4
mov esi, eax
mov dword [ebp - 4], 1
mov al, byte [esi + 0x48]
test al, al
je 0x478d92
mov edx, str.RegQueryValueEx
mov ecx, esi
call fcn.004151c0
mov al, byte [esi + 0x48]
test al, al
je 0x478d92
push edi
push esi
call fcn.00414f60
mov al, byte [esi + 0x48]
add esp, 8
test al, al
je 0x478d92
mov edx, str._failed
mov ecx, esi
call fcn.004151c0
cmp byte [esi + 0x48], 0
mov edi, dword [ebp - 0x1c]
je 0x478d95
push edi
mov ecx, esi
call fcn.00413060
lea ecx, [ebp - 0x16c]
call fcn.0040fdc0
jmp 0x478cc3
mov edi, dword [ebp - 0x1c]
lea ecx, [ebp - 0x16c]
call fcn.0040fdc0
jmp 0x478cc3