Function at 0x4c9540
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a0e90
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x62819c]
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 0x4c966c
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 0x4c965e
mov ebx, dword [edi + 0xc]
lea esi, [edi + 0x10]
mov dword [ebp - 0x14], 0
test eax, eax
je 0x4c974a
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 0x4c95d3
cmp eax, 2
jne 0x4c965b
mov ecx, esi
call fcn.00429490
mov edx, dword [ebp - 0x14]
shr edx, 1
add edx, 1
js 0x4c975c
mov edi, dword [esi]
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, edx
or ecx, eax
jge 0x4c9605
push edx
mov ecx, esi
call fcn.004296d0
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 0x4c965b
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 0x4c9645
push dword [eax - 8]
push eax
call fcn.00555593
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x4c975c
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x4c975c
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 0x4c974a
push eax
jmp 0x4c9744
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00546052
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 0x4c9711
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 0x4c96fa
mov eax, dword [ebp - 0x14]
cmp eax, 1
je 0x4c96ef
cmp eax, 2
jne 0x4c96fa
cmp dword [ebp - 0x18], 0
jne 0x4c96fa
xor eax, eax
mov word [ebx], ax
test esi, esi
je 0x4c970a
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 0x4c9720
sub edx, edi
sar edx, 1
push edx
push ebx
call fcn.00429870
push ebx
call fcn.0054605b
add esp, 4
test esi, esi
je 0x4c974a
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.004293d0
int3