Function at 0x4d1630
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5a6895
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x63434c]
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 0x4d1763
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 0x4d1755
mov ebx, dword [edi + 0xc]
lea esi, [edi + 0x10]
mov dword [ebp - 0x14], 0
test eax, eax
je 0x4d184a
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 0x4d16ca
cmp eax, 2
jne 0x4d1752
mov ecx, esi
call fcn.00429bc0
mov edx, dword [ebp - 0x14]
shr edx, 1
add edx, 1
js 0x4d185c
mov edi, dword [esi]
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, edx
or ecx, eax
jge 0x4d16fc
push edx
mov ecx, esi
call fcn.00429e50
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 0x4d1752
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 0x4d173c
push dword [eax - 8]
push eax
call fcn.00566c13
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x4d185c
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x4d185c
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 0x4d184a
push eax
jmp 0x4d1844
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00558012
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 0x4d17bb
mov esi, dword [ebp - 0x18]
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 1
test eax, eax
jne 0x4d1813
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 0x4d17fc
mov eax, dword [ebp - 0x14]
cmp eax, 1
je 0x4d17f1
cmp eax, 2
jne 0x4d17fc
cmp dword [ebp - 0x18], 0
jne 0x4d17fc
xor eax, eax
mov word [ebx], ax
test esi, esi
je 0x4d180c
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 0x4d1820
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4d1820
sub edx, edi
sar edx, 1
push edx
push ebx
call fcn.0042a000
push ebx
call fcn.0055801b
add esp, 4
test esi, esi
je 0x4d184a
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.00429b00
int3