Function at 0x4f3470
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x571700
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5d6b80]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x24], ecx
call fcn.0045adc0
xor edx, edx
mov ecx, eax
test ecx, ecx
setne dl
test edx, edx
jne 0x4f34b7
push 0x80004005
call fcn.0045a8f0
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
push dword [0x5d6450]
lea eax, [ebp - 0x14]
mov dword [ebp - 4], 0
push dword [0x5d644c]
push dword [0x5d6828]
push dword [0x5d6814]
push str._s_s_s_s
push eax
call fcn.0045acb0
add esp, 0x18
call fcn.0045adc0
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4f350e
push 0x80004005
call fcn.0045a8f0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov esi, dword [ebp - 0x14]
lea ecx, [ebp - 0x30]
push 1
push esi
push reloc.WS2_32.dll_accept
mov byte [ebp - 4], 2
call fcn.0045b220
or ebx, 0xffffffff
test eax, eax
jne 0x4f3713
mov edi, dword [ebp - 0x10]
mov ebx, 0x5d50b8
lea ebx, [ebx]
cmp dword [edi - 0xc], 0
lea edx, [edi - 0x10]
mov eax, dword [edx]
mov dword [ebp - 0x18], eax
je 0x4f35b7
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
jge 0x4f3595
cmp dword [edi - 8], 0
jl 0x4f3709
mov dword [edi - 0xc], 0
xor ecx, ecx
mov eax, dword [ebp - 0x10]
mov word [eax], cx
mov edi, dword [ebp - 0x10]
jmp 0x4f35b7
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4f35a9
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0x18]
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x10], edi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x4f35db
push 0x104
lea ecx, [ebp - 0x10]
call fcn.0045b530
mov edi, dword [ebp - 0x10]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0x208
push eax
push edi
lea eax, [ebp - 0x20]
push eax
push 0
push dword [ebx]
push dword [ebp - 0x30]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4f3618
mov eax, dword [ebp - 0x20]
cmp eax, 1
je 0x4f3609
cmp eax, 2
jne 0x4f3618
test edi, edi
je 0x4f3618
cmp dword [ebp - 0x18], 0
jne 0x4f3618
xor eax, eax
mov word [edi], ax
mov eax, dword [ebp - 0x10]
push dword [eax - 8]
push eax
call fcn.00526d13
mov edx, eax
add esp, 8
test edx, edx
js 0x4f3709
mov ecx, dword [ebp - 0x10]
cmp edx, dword [ecx - 8]
jg 0x4f3709
mov dword [ecx - 0xc], edx
xor ecx, ecx
mov eax, dword [ebp - 0x10]
mov word [eax + edx*2], cx
mov edi, dword [ebp - 0x10]
cmp dword [edi - 0xc], ecx
je 0x4f3699
push dword [ebx]
lea ecx, [ebp - 0x1c]
call fcn.0045a3a0
mov ecx, dword [ebp - 0x24]
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 3
push eax
lea ecx, [ecx + 0x100]
call fcn.004ed030
mov edx, dword [ebp - 0x1c]
or ecx, 0xffffffff
add edx, 0xfffffff0
mov byte [ebp - 4], 2
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f3696
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [ebp - 0x10]
add ebx, 4
cmp ebx, 0x5d5180
jl 0x4f3560
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4f36b9
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x10]
or ebx, 0xffffffff
add edi, 0xfffffff0
mov byte [ebp - 4], 0
mov ecx, ebx
lea eax, [edi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4f36d9
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x4f36f7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.0045a8f0
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x4f3721
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp - 0x10]
jmp 0x4f36bc