Function at 0x504a30
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, ecx
lea eax, [esp + 0x18]
push edi
lea ecx, [esp + 0x14]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0x5c6ff0
push 0
push str.SoftwareDownloadManagermaxID
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x18]
lea eax, [esp + 0x10]
push edx
push eax
push 0
push 0
push str.maxID
push ecx
mov dword [esp + 0x30], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x504a91
xor eax, eax
jmp 0x504a95
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x28]
inc eax
test ebx, ebx
mov dword [esp + 0x10], eax
mov dword [esi + 0x420], eax
je 0x504ab5
push 0
push 0
push eax
lea ecx, [esi + 0x20]
call fcn.00508260
mov eax, dword [esp + 0x14]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [esp + 0x10]
push 4
push edx
push 4
push 0
push str.maxID
push eax
call ebp
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x504af3
mov eax, dword [esi + 0x428]
mov ecx, dword [esi + 0x42c]
jmp 0x504af7
xor eax, eax
xor ecx, ecx
mov edx, dword [esp + 0x10]
lea edi, [esi + 0x20]
push ecx
push eax
push edx
mov ecx, edi
call fcn.00508cd0
mov eax, dword [esp + 0x10]
mov ecx, edi
push eax
call fcn.00507fd0
mov eax, dword [esi + 0x1bc]
test eax, eax
jne 0x504b28
mov ecx, dword [esi + 0x780]
test ecx, ecx
je 0x504b40
mov ecx, dword [esi + 0x420]
mov edx, dword [esi + 0x780]
push 0
push ecx
push eax
push edx
mov ecx, edi
call fcn.00508060
test ebx, ebx
jne 0x504c43
mov eax, dword [esi + 0x50]
test eax, eax
je 0x504c43
mov eax, dword [esi + 0x4c]
test eax, eax
je 0x504c43
lea ebx, [esi + 0x448]
test ebx, ebx
je 0x504c43
mov eax, dword [esi + 0x3e0]
test eax, eax
jne 0x504b8b
mov eax, dword [esp + 0x10]
lea ecx, [esi + 0x20]
push eax
call fcn.0050a460
test al, al
je 0x504c92
mov edx, dword [esi + 0x50]
test edx, edx
je 0x504bbc
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x504bbc
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esi + 0x3e0]
push edx
push 1
push eax
push str.LocalFileName
push ecx
call ebp
mov edx, dword [esi + 0x4c]
test edx, edx
je 0x504bed
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x504bed
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
mov edx, dword [esi + 0x3e0]
push 1
push eax
push str.LocalPath
push edx
call ebp
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x504c17
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
push ebx
push 1
push eax
mov eax, dword [esi + 0x3e0]
push str.LogFileName
push eax
call ebp
mov ecx, dword [esi + 0x434]
lea eax, [esi + 0x430]
test ecx, ecx
jl 0x504c43
jg 0x504c2e
cmp dword [eax], 0
jbe 0x504c43
mov ecx, dword [esi + 0x3e0]
push 8
push eax
push 0
push 0
push str.Downloaded
push ecx
call ebp
mov eax, dword [esp + 0x24]
test eax, eax
je 0x504c92
mov eax, dword [esi + 0x434]
lea edi, [esi + 0x430]
test eax, eax
jl 0x504c92
jg 0x504c62
cmp dword [edi], 0
jbe 0x504c92
mov eax, dword [esi + 0x3e0]
test eax, eax
jne 0x504c7d
mov edx, dword [esp + 0x10]
lea ecx, [esi + 0x20]
push edx
call fcn.0050a460
test al, al
je 0x504c92
mov eax, dword [esi + 0x3e0]
push 8
push edi
push 0
push 0
push str.Downloaded
push eax
call ebp
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 8