Function at 0x4d20e0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5aae65
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x639354]
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 0x4d2213
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x10]
push eax
push 0x20019
push 0
push dword [edi + 8]
push dword [edi + 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
mov eax, dword [ebp - 0x10]
jne 0x4d2205
mov ebx, dword [edi + 0xc]
lea esi, [edi + 0x10]
mov dword [ebp - 0x14], 0
test eax, eax
je 0x4d22fa
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 0x4d217a
cmp eax, 2
jne 0x4d2202
mov ecx, esi
call fcn.00429c20
mov edx, dword [ebp - 0x14]
shr edx, 1
add edx, 1
js 0x4d230c
mov edi, dword [esi]
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, edx
or ecx, eax
jge 0x4d21ac
push edx
mov ecx, esi
call fcn.00429eb0
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 0x4d2202
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 0x4d21ec
push dword [eax - 8]
push eax
call fcn.0056b163
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x4d230c
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x4d230c
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 0x4d22fa
push eax
jmp 0x4d22f4
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0055c532
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
mov dword [ebp - 4], 1
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], esi
push eax
push 0x2001f
push esi
push dword [edi + 8]
push dword [edi + 4]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4d226b
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 1
test eax, eax
jne 0x4d22c3
mov eax, dword [ebp - 0x14]
add eax, eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push ebx
lea eax, [ebp - 0x14]
push eax
push 0
push dword [edi + 0xc]
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4d22ac
mov eax, dword [ebp - 0x14]
cmp eax, 1
je 0x4d22a1
cmp eax, 2
jne 0x4d22ac
cmp dword [ebp - 0x18], 0
jne 0x4d22ac
xor eax, eax
mov word [ebx], ax
test esi, esi
je 0x4d22bc
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]
jmp 0x4d22d0
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4d22d0
sub edx, edi
sar edx, 1
push edx
push ebx
call fcn.0042a060
push ebx
call fcn.0055c53b
add esp, 4
test esi, esi
je 0x4d22fa
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.00429b60
int3