Function at 0x498430
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x518cec
mov eax, dword fs:[0]
push eax
sub esp, 0xe0
push ebx
push esi
push edi
mov eax, dword [0x574be0]
xor eax, esp
push eax
lea eax, [esp + 0xf0]
mov dword fs:[0], eax
xor bl, bl
mov byte [esp + 0x16], bl
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 0
lea eax, [esp + 0x1c]
push eax
push 0x20019
push 0
push str.CLSIDD27CDB6E_AE6D_11cf_96B8_444553540000InprocServer32
mov dword [esp + 0x108], 0
push SysReAllocString
mov dword [esp + 0x30], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4987a3
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x28], eax
mov eax, dword [0x575ba4]
mov ecx, 0x575ba4
mov dword [esp + 0x24], esi
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [esp + 0x30], edi
xor ecx, ecx
mov eax, 0x1fffff
mov edx, 2
mul edx
seto cl
mov byte [esp + 0xf8], 1
neg ecx
or ecx, eax
push ecx
call fcn.004eaae6
push 0x3ffffe
mov ebx, eax
push 0
push ebx
call fcn.004efe90
add esp, 0x10
lea eax, [esp + 0x18]
push eax
push ebx
lea eax, [esp + 0x28]
push eax
push 0
push 0x54c754
push esi
mov dword [esp + 0x30], 0x3ffffe
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x498559
mov eax, dword [esp + 0x20]
cmp eax, 1
je 0x49853f
cmp eax, 2
jne 0x498559
test ebx, ebx
je 0x4985a5
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4985a0
test al, 1
jne 0x498559
shr eax, 1
cmp word [ebx + eax*2 - 2], 0
je 0x4985a5
add edi, 0xfffffff0
mov byte [esp + 0xf8], 0
lea eax, [edi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x49857b
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
test esi, esi
je 0x498586
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [esp + 0x16]
mov ecx, dword [esp + 0xf0]
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
mov eax, dword [0x575ba4]
mov ecx, 0x575ba4
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x18], esi
mov byte [esp + 0xf8], 2
test ebx, ebx
je 0x498601
test ebx, 0xffff0000
jne 0x4985e8
movzx ebx, bx
mov ecx, ebx
call fcn.0041fcd0
test eax, eax
je 0x498612
push ebx
push eax
lea ecx, [esp + 0x20]
call fcn.00420bb0
jmp 0x49860e
mov ecx, ebx
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4985f0
sub ecx, edx
sar ecx, 1
jmp 0x498603
xor ecx, ecx
push ecx
push ebx
lea ecx, [esp + 0x20]
call fcn.00420c80
mov esi, dword [esp + 0x18]
sub esp, 0xc
lea ecx, [esp + 0x40]
push esi
mov byte [esp + 0x108], 3
call fcn.004275a0
mov eax, dword [esp + 0x34]
mov eax, dword [eax + 4]
cmp dword [esp + eax + 0x40], 0
mov dword [esp + eax + 0x34], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0x34]
sete byte [esp + 0x17]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [esp + ecx + 0x30], eax
cmp dword [esp + 0x94], 0
mov dword [esp + 0x44], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
je 0x49868a
mov edx, dword [esp + 0x50]
lea eax, [esp + 0x88]
cmp dword [edx], eax
jne 0x49868a
mov eax, dword [esp + 0x7c]
mov ecx, dword [esp + 0x80]
mov dword [edx], eax
mov eax, dword [esp + 0x60]
mov dword [eax], ecx
mov eax, dword [esp + 0x70]
sub ecx, ecx
mov dword [eax], ecx
cmp byte [esp + 0x90], 0
je 0x49869d
lea ecx, [esp + 0x44]
call fcn.00428330
mov ebx, dword [esp + 0x78]
mov dword [esp + 0x44], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
test ebx, ebx
je 0x4986cd
mov ecx, dword [ebx]
test ecx, ecx
je 0x4986c4
mov eax, dword [ecx]
call dword [eax + 8]
test eax, eax
je 0x4986c4
mov edx, dword [eax]
push 1
mov ecx, eax
call dword [edx]
push ebx
call fcn.004ea2dd
add esp, 4
mov eax, dword [esp + 0x34]
mov eax, dword [eax + 4]
mov dword [esp + eax + 0x34], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
mov eax, dword [esp + 0x34]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [esp + ecx + 0x30], eax
lea eax, [esp + 0xa4]
push eax
mov dword [esp + 0xa8], vtable.std::ios_base.0
call fcn.00509bc6
add esp, 4
cmp byte [esp + 0x17], 0
lea edx, [esi - 0x10]
sete bl
or esi, 0xffffffff
mov byte [esp + 0xf8], 1
lea ecx, [edx + 0xc]
mov eax, esi
lock xadd dword [ecx], eax
dec eax
test eax, eax
jg 0x498731
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add edi, 0xfffffff0
mov byte [esp + 0xf8], 0
lea eax, [edi + 0xc]
test bl, bl
je 0x498781
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x498754
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x498586
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, byte [esp + 0x16]
mov ecx, dword [esp + 0xf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov bl, 1
lock xadd dword [eax], esi
dec esi
test esi, esi
jg 0x498794
mov ecx, dword [edi]
push edi
mov edx, dword [ecx]
call dword [edx + 4]
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x4987a3
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
mov ecx, dword [esp + 0xf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret