Function at 0x4baff0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a0740
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x61ce74]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x14]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x4bb11c
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push dword [edi + 8]
push dword [edi + 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
mov eax, dword [ebp - 0x10]
jne 0x4bb10e
mov ebx, dword [edi + 0xc]
lea esi, [edi + 0x10]
mov dword [ebp - 0x14], 0
test eax, eax
je 0x4bb1fa
lea ecx, [ebp - 0x14]
push ecx
push 0
lea ecx, [ebp - 0x18]
push ecx
push 0
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [ebp - 0x18]
cmp eax, 1
je 0x4bb083
cmp eax, 2
jne 0x4bb10b
mov ecx, esi
call fcn.00426010
mov edx, dword [ebp - 0x14]
shr edx, 1
add edx, 1
js 0x4bb20c
mov edi, dword [esi]
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, edx
or ecx, eax
jge 0x4bb0b5
push edx
mov ecx, esi
call fcn.00426250
mov edi, dword [esi]
lea eax, [ebp - 0x14]
push eax
push edi
lea eax, [ebp - 0x18]
push eax
push 0
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4bb10b
mov eax, dword [ebp - 0x14]
xor ecx, ecx
shr eax, 1
mov word [edi + eax*2], cx
mov eax, dword [esi]
test eax, eax
je 0x4bb0f5
push dword [eax - 8]
push eax
call fcn.0054b2c2
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x4bb20c
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x4bb20c
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [esi]
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4bb1fa
push eax
jmp 0x4bb1f4
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0053d0bd
mov ebx, eax
xor esi, esi
xor eax, eax
mov dword [ebp - 0x24], esi
add esp, 4
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov word [ebx], ax
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 1
push eax
push 0x2001f
push esi
push dword [edi + 8]
mov dword [ebp - 0x18], esi
push dword [edi + 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4bb1c1
mov eax, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
add eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push ebx
lea eax, [ebp - 0x14]
mov dword [ebp - 0x24], esi
push eax
push 0
push dword [edi + 0xc]
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4bb1aa
mov eax, dword [ebp - 0x14]
cmp eax, 1
je 0x4bb19f
cmp eax, 2
jne 0x4bb1aa
cmp dword [ebp - 0x18], 0
jne 0x4bb1aa
xor eax, eax
mov word [ebx], ax
test esi, esi
je 0x4bb1ba
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], 0
mov edx, ebx
lea ecx, [edi + 0x10]
lea edi, [edx + 2]
lea esp, [esp]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4bb1d0
sub edx, edi
sar edx, 1
push edx
push ebx
call fcn.004263f0
push ebx
call fcn.0053d0c6
add esp, 4
test esi, esi
je 0x4bb1fa
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
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.00425f50
int3