Function at 0x516480
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x725acb
mov eax, dword fs:[0]
push eax
sub esp, 0x7fc
mov eax, dword [0x7db1e8]
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 edi, dword [ebp + 8]
xor esi, esi
mov dword [ebp - 0x800], esi
xor eax, eax
mov dword [ebp - 0x7f8], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x7fc], 0x7d0
mov dword [ebp - 0x7e8], esi
mov dword [ebp - 0x7e4], 7
mov word [ebp - 0x7f8], ax
mov cl, byte [ebp + 0xc]
mov edx, 0x12
test cl, cl
mov byte [ebp - 4], 1
mov eax, 0xb
lea ecx, [ebp - 0x7f8]
cmovne eax, edx
mov edx, 0x73b0c4
push eax
mov eax, str.CompanyEnglishName
cmove eax, edx
push eax
call fcn.004da1e0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x800]
push eax
push 0x20019
push esi
push 0x73b108
push connect
mov dword [ebp - 0x800], esi
call ebx
test eax, eax
jne 0x5165cc
cmp dword [ebp - 0x7e4], 8
lea ecx, [ebp - 0x804]
mov esi, dword [ebp - 0x800]
lea eax, [ebp - 0x7f8]
cmovae eax, dword [ebp - 0x7f8]
push ecx
lea ecx, [ebp - 0x7e0]
mov dword [ebp - 0x800], esi
push ecx
lea ecx, [ebp - 0x808]
mov dword [ebp - 0x804], 0xfa0
push ecx
push 0
push eax
push esi
mov dword [ebp - 0x7fc], 0
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x5165cc
mov eax, dword [ebp - 0x808]
cmp eax, 1
je 0x5165a9
cmp eax, 2
jne 0x5165cc
mov eax, dword [ebp - 0x804]
test eax, eax
je 0x516809
test al, 1
jne 0x5165cc
shr eax, 1
cmp word [ebp + eax*2 - 0x7e2], 0
je 0x516812
lea eax, [ebp - 0x804]
mov dword [ebp - 0x804], 0
push eax
push 0x20219
push 0
push 0x73b108
push connect
call ebx
test eax, eax
jne 0x51668b
test esi, esi
je 0x516603
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x804]
mov dword [ebp - 0x800], esi
test eax, eax
jne 0x51668b
cmp dword [ebp - 0x7e4], 8
lea ecx, [ebp - 0x7f8]
mov eax, dword [ebp - 0x7fc]
cmovae ecx, dword [ebp - 0x7f8]
add eax, eax
mov dword [ebp - 0x7fc], eax
lea eax, [ebp - 0x7fc]
push eax
lea eax, [ebp - 0x7e0]
push eax
lea eax, [ebp - 0x808]
push eax
push 0
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x51668b
mov eax, dword [ebp - 0x808]
cmp eax, 1
je 0x516668
cmp eax, 2
jne 0x51668b
mov eax, dword [ebp - 0x7fc]
test eax, eax
je 0x516842
test al, 1
jne 0x51668b
shr eax, 1
cmp word [ebp + eax*2 - 0x7e2], 0
je 0x51684b
lea eax, [ebp - 0x7fc]
mov dword [ebp - 0x804], 0x7d0
push eax
push 0x20019
push 0
push 0x73b108
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x7fc], 0
call ebx
test eax, eax
jne 0x51675a
test esi, esi
je 0x5166cc
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x7fc]
mov dword [ebp - 0x800], esi
test eax, eax
jne 0x51675a
cmp dword [ebp - 0x7e4], 8
lea ecx, [ebp - 0x7fc]
push ecx
lea ecx, [ebp - 0x7e0]
mov dword [ebp - 0x7fc], 0xfa0
push ecx
lea ecx, [ebp - 0x808]
mov dword [ebp - 0x804], 0
push ecx
lea eax, [ebp - 0x7f8]
cmovae eax, dword [ebp - 0x7f8]
push 0
push eax
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x51675a
mov eax, dword [ebp - 0x808]
cmp eax, 1
je 0x516737
cmp eax, 2
jne 0x51675a
mov eax, dword [ebp - 0x7fc]
test eax, eax
je 0x516861
test al, 1
jne 0x51675a
shr eax, 1
cmp word [ebp + eax*2 - 0x7e2], 0
je 0x51686a
lea eax, [ebp - 0x7fc]
mov dword [ebp - 0x7fc], 0
push eax
push 0x20219
push 0
push 0x73b108
push reloc.OLEAUT32.dll_SysReAllocString
call ebx
test eax, eax
jne 0x516883
test esi, esi
je 0x516791
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x7fc]
mov dword [ebp - 0x800], esi
test eax, eax
jne 0x516883
cmp dword [ebp - 0x7e4], 8
lea ecx, [ebp - 0x804]
push ecx
lea ecx, [ebp - 0x7e0]
lea eax, [ebp - 0x7f8]
cmovae eax, dword [ebp - 0x7f8]
push ecx
push eax
lea ecx, [ebp - 0x800]
call fcn.00517e60
test eax, eax
jne 0x516883
lea ecx, [ebp - 0x7e0]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5167e4
sub ecx, edx
lea eax, [ebp - 0x7e0]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.004da1e0
mov bl, 1
jmp 0x516899
xor eax, eax
mov word [ebp - 0x7e0], ax
lea edx, [ebp - 0x7e0]
lea ecx, [edx + 2]
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x516820
sub edx, ecx
lea eax, [ebp - 0x7e0]
sar edx, 1
mov ecx, edi
push edx
push eax
call fcn.004da1e0
mov bl, 1
jmp 0x516899
xor eax, eax
mov word [ebp - 0x7e0], ax
lea ecx, [ebp - 0x7e0]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x516854
jmp 0x5167ef
xor eax, eax
mov word [ebp - 0x7e0], ax
lea ecx, [ebp - 0x7e0]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x516873
jmp 0x5167ef
mov dword [edi + 0x10], 0
cmp dword [edi + 0x14], 8
jb 0x516892
mov edi, dword [edi]
xor eax, eax
xor bl, bl
mov word [edi], ax
mov edx, dword [ebp - 0x7e4]
cmp edx, 8
jb 0x5168d5
mov ecx, dword [ebp - 0x7f8]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x5168cb
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x51691b
push edx
push ecx
call fcn.006f4b9f
add esp, 8
xor eax, eax
mov dword [ebp - 0x7e8], 0
mov dword [ebp - 0x7e4], 7
mov word [ebp - 0x7f8], ax
test esi, esi
je 0x5168fd
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
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.006f4db8
mov esp, ebp
pop ebp
ret
call fcn.006fb96e
int3