Function at 0x540750
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 0x663188
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 0x5407b1
xor eax, eax
jmp 0x5407b5
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x28]
inc eax
test ebx, ebx
mov dword [esp + 0x10], eax
mov dword [esi + 0x400], eax
je 0x5407d5
push 0
push 0
push eax
lea ecx, [esi + 0x20]
call fcn.00548200
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 0x540813
mov eax, dword [esi + 0x408]
mov ecx, dword [esi + 0x40c]
jmp 0x540817
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.00549160
mov eax, dword [esp + 0x10]
mov ecx, edi
push eax
call fcn.00547a70
mov eax, dword [esi + 0xc8]
test eax, eax
jne 0x540848
mov ecx, dword [esi + 0x86c]
test ecx, ecx
je 0x540860
mov ecx, dword [esi + 0x400]
mov edx, dword [esi + 0x86c]
push 0
push ecx
push eax
push edx
mov ecx, edi
call fcn.00547b00
test ebx, ebx
jne 0x540963
mov eax, dword [esi + 0x50]
test eax, eax
je 0x540963
mov eax, dword [esi + 0x4c]
test eax, eax
je 0x540963
lea ebx, [esi + 0x430]
test ebx, ebx
je 0x540963
mov eax, dword [esi + 0x3c0]
test eax, eax
jne 0x5408ab
mov eax, dword [esp + 0x10]
lea ecx, [esi + 0x20]
push eax
call fcn.0054cc00
test al, al
je 0x5409b2
mov edx, dword [esi + 0x50]
test edx, edx
je 0x5408dc
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x5408dc
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
mov ecx, dword [esi + 0x3c0]
push edx
push 1
push eax
push str.LocalFileName
push ecx
call ebp
mov edx, dword [esi + 0x4c]
test edx, edx
je 0x54090d
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x54090d
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
mov edx, dword [esi + 0x3c0]
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 0x540937
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 + 0x3c0]
push str.LogFileName
push eax
call ebp
mov ecx, dword [esi + 0x414]
lea eax, [esi + 0x410]
test ecx, ecx
jl 0x540963
jg 0x54094e
cmp dword [eax], 0
jbe 0x540963
mov ecx, dword [esi + 0x3c0]
push 8
push eax
push 0
push 0
push str.Downloaded
push ecx
call ebp
mov eax, dword [esp + 0x24]
test eax, eax
je 0x5409b2
mov eax, dword [esi + 0x414]
lea edi, [esi + 0x410]
test eax, eax
jl 0x5409b2
jg 0x540982
cmp dword [edi], 0
jbe 0x5409b2
mov eax, dword [esi + 0x3c0]
test eax, eax
jne 0x54099d
mov edx, dword [esp + 0x10]
lea ecx, [esi + 0x20]
push edx
call fcn.0054cc00
test al, al
je 0x5409b2
mov eax, dword [esi + 0x3c0]
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