Function at 0x509910
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x565b88
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x114
mov eax, dword [0x5c2a74]
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], 0
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push edx
lea eax, [ebp - 0x14]
push str.SoftwareDownloadManagerGrabberStsProjects_ld_ld_
push eax
mov byte [ebp - 4], 1
call fcn.0053afda
add esp, 0x10
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x1c]
lea edx, [ebp + 0xc]
push ecx
push edx
push 0
push 0xf003f
push 0
push 0x5c6ff0
push 0
push eax
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x509ab8
lea ecx, [ebp + 8]
lea edx, [ebp - 0x120]
push ecx
push edx
push eax
push eax
mov eax, dword [ebp + 0xc]
push str.LocalPath
push eax
mov dword [ebp + 8], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x5099c4
mov ecx, dword [ebp + 0xc]
push ecx
jmp 0x509ab2
lea edx, [ebp - 0x120]
push edx
call fcn.005297d3
add esp, 4
test eax, eax
je 0x5099e0
mov eax, dword [ebp + 0xc]
push eax
jmp 0x509ab2
mov eax, dword [ebx + 0x2c]
test eax, eax
je 0x5099f0
push eax
call fcn.00542796
add esp, 4
lea edi, [ebp - 0x120]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.0054276d
mov edx, eax
add esp, 4
test edx, edx
mov dword [ebx + 0x2c], edx
jne 0x509a26
push str.URL::set_localPath__:_Not_enough_memory__n
mov ecx, ebx
call fcn.00507f00
mov ecx, dword [ebp + 0xc]
push ecx
jmp 0x509ab2
lea edi, [ebp - 0x120]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [ebp + 8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
lea eax, [ebp - 0x120]
and ecx, 3
push edx
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push eax
push 0
push 0
mov edi, 0x104
push str.LocalFileName
push ecx
mov dword [ebp + 8], edi
call esi
test eax, eax
jne 0x509aae
lea eax, [ebp - 0x120]
mov ecx, ebx
push eax
call fcn.00509ce0
test eax, eax
je 0x509a8d
mov ecx, dword [ebp + 0xc]
push ecx
jmp 0x509ab2
mov ecx, dword [ebp + 0xc]
lea edx, [ebp + 8]
lea eax, [ebp - 0x120]
push edx
push eax
push 0
push 0
push str.LogFileName
push ecx
mov dword [ebp + 8], edi
call esi
test eax, eax
je 0x509adc
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.005421be
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebx + 0x3b8]
lea edi, [ebp - 0x120]
or ecx, 0xffffffff
xor eax, eax
add edx, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0
call fcn.005421be
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8