Function at 0x4e8c70
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x518b91
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
push ebx
push esi
push edi
mov eax, dword [0x572bb0]
xor eax, esp
push eax
lea eax, [esp + 0xe8]
mov dword fs:[0], eax
mov byte [esp + 0x13], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x24], 0
lea eax, [esp + 0x14]
mov dword [esp + 0xf0], 0
push eax
push 0x20019
push 0
push str.CLSIDD27CDB6E_AE6D_11cf_96B8_444553540000InprocServer32
push SysReAllocString
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4e8ddb
mov edi, dword [esp + 0x14]
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], edi
call fcn.00460220
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x4e8d1e
push 0x80004005
call fcn.004712d0
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x28], esi
xor ecx, ecx
mov byte [esp + 0xf0], 1
mov eax, 0x1fffff
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004ea22e
push 0x3ffffe
mov ebx, eax
push 0
push ebx
call fcn.004ef3a0
add esp, 0x10
mov dword [esp + 0x14], 0x3ffffe
lea eax, [esp + 0x14]
push eax
push ebx
lea eax, [esp + 0x20]
push eax
push 0
push 0x54c444
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4e8dae
mov eax, dword [esp + 0x18]
cmp eax, 1
je 0x4e8d94
cmp eax, 2
jne 0x4e8dae
test ebx, ebx
je 0x4e8dfa
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4e8df5
test al, 1
jne 0x4e8dae
shr eax, 1
cmp word [ebx + eax*2 - 2], 0
je 0x4e8dfa
add esi, 0xfffffff0
mov byte [esp + 0xf0], 0
or ecx, 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4e8dd0
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
test edi, edi
je 0x4e8ddb
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [esp + 0x13]
mov ecx, dword [esp + 0xe8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov word [ebx], ax
push ebx
lea ecx, [esp + 0x18]
call fcn.00471bb0
sub esp, 0xc
mov byte [esp + 0xfc], 2
lea ecx, [esp + 0x38]
push dword [esp + 0x20]
call fcn.00479090
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 4]
cmp dword [esp + eax + 0x38], 0
mov dword [esp + eax + 0x2c], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0x2c]
sete byte [esp + 0x12]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [esp + ecx + 0x28], eax
cmp dword [esp + 0x8c], 0
mov dword [esp + 0x3c], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
je 0x4e8e7c
mov eax, dword [esp + 0x48]
lea ecx, [esp + 0x80]
cmp dword [eax], ecx
jne 0x4e8e7c
mov edx, dword [esp + 0x78]
mov ecx, dword [esp + 0x74]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [esp + 0x58]
mov dword [eax], ecx
mov eax, dword [esp + 0x68]
mov dword [eax], edx
cmp byte [esp + 0x88], 0
je 0x4e8e8f
lea ecx, [esp + 0x3c]
call fcn.00479fc0
mov ebx, dword [esp + 0x70]
mov dword [esp + 0x3c], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
test ebx, ebx
je 0x4e8ebf
mov ecx, dword [ebx]
test ecx, ecx
je 0x4e8eb6
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x4e8eb6
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push ebx
call fcn.004e98a6
add esp, 4
mov eax, dword [esp + 0x2c]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x2c], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [esp + ecx + 0x28], eax
lea eax, [esp + 0x9c]
push eax
mov dword [esp + 0xa0], vtable.std::ios_base.0
call fcn.0050944b
add esp, 4
mov byte [esp + 0xf0], 1
cmp byte [esp + 0x12], 0
mov edx, dword [esp + 0x14]
sete byte [esp + 0x12]
add edx, 0xfffffff0
or ebx, 0xffffffff
mov eax, ebx
lea ecx, [edx + 0xc]
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x4e8f29
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov byte [esp + 0xf0], 0
cmp byte [esp + 0x12], 0
lea eax, [esi + 0xc]
je 0x4e8f4a
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jmp 0x4e8dc6
mov byte [esp + 0x13], 1
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jmp 0x4e8dc6