Function at 0x481890
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x40
cmp dword [0x5194ac], 0
push ebx
push ebp
mov ebx, eax
mov eax, dword [0x51161c]
mov ebp, dword [eax + 0xd0]
push esi
push edi
mov edi, ecx
mov esi, edx
mov dword [esp + 0x20], ebp
je 0x4818e8
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [0x5194ac]
test eax, eax
je 0x4818e3
cmp dword [esp + 0x24], 0
je 0x4818e3
mov eax, dword [0x51161c]
mov dword [eax + 0xd0], 0x200
jmp 0x4818e8
mov eax, dword [0x51161c]
xor cl, cl
mov byte [esp + 0x12], cl
mov dword [esp + 0x18], 0
mov byte [esp + 0x13], cl
test edi, edi
je 0x481b86
test ebx, ebx
je 0x481b86
lea ecx, [esp + 0x13]
push ecx
push 0
push 2
push edi
call fcn.0041c510
add esp, 0x10
mov dword [esp + 0x24], eax
test eax, eax
je 0x481b2b
mov ecx, dword [0x51161c]
lea edx, [esp + 0x18]
push edx
mov edx, dword [ecx + 0xd0]
or edx, 0x20019
push edx
push 0
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x481b2b
mov ebx, dword [esp + 0x54]
mov ecx, dword [esp + 0x18]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push eax
push eax
lea eax, [esp + 0x24]
push eax
push 0
push ebx
push ecx
call ebp
test eax, eax
jne 0x481b2b
mov eax, dword [esp + 0x1c]
dec eax
cmp eax, 6
ja case.0x481983.5
jmp dword [eax*4 + 0x481b98]
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x2c]
push eax
push 0
push 0
push ebx
push ecx
mov dword [esp + 0x2c], 4
call ebp
test eax, eax
jne case.0x481983.5
mov edx, dword [esp + 0x28]
push eax
push edx
mov eax, esi
call fcn.004152a0
test eax, eax
je 0x481b2b
jmp case.0x481983.5
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0
push ebx
push ecx
mov dword [esp + 0x2c], 0
call ebp
test eax, eax
jne case.0x481983.5
mov eax, dword [esp + 0x14]
test eax, eax
je case.0x481983.5
shr eax, 1
lea edi, [eax + 2]
call fcn.00415010
test eax, eax
je 0x481b2b
mov esi, dword [esi + 4]
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x14]
push edx
push esi
push 0
push 0
push ebx
push eax
call ebp
test eax, eax
jne 0x481a5e
mov eax, dword [esp + 0x14]
test eax, eax
je 0x481a5e
shr eax, 1
xor ecx, ecx
mov dword [esi + eax*2], ecx
cmp dword [esp + 0x1c], 7
jne case.0x481983.5
mov eax, esi
cmp word [eax], 0
jne 0x481a59
cmp word [eax + 2], 0
mov ecx, 0xa
mov word [eax], cx
je case.0x481983.5
add eax, 2
jmp 0x481a40
xor edx, edx
mov word [esi], dx
jmp case.0x481983.5
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x14]
push eax
push 0
push 0
push 0
push ebx
push ecx
mov dword [esp + 0x2c], 0
call ebp
test eax, eax
jne case.0x481983.5
mov eax, dword [esp + 0x14]
test eax, eax
je case.0x481983.5
lea edi, [eax + eax]
call fcn.00415010
test eax, eax
je 0x481b2b
mov ebp, dword [esi + 4]
mov ecx, dword [esp + 0x54]
xor edx, edx
mov word [ebp], dx
mov eax, dword [esp + 0x14]
lea ebx, [ebp + eax*2]
add ebx, eax
lea eax, [esp + 0x14]
push eax
push ebx
push edx
push edx
mov edx, dword [esp + 0x28]
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne case.0x481983.5
mov ecx, 8
mov esi, 0x507a80
lea edi, [esp + 0x2c]
rep movsd dword es:[edi], dword [esi]
xor ecx, ecx
xor edx, edx
movsw word es:[edi], word [esi]
cmp dword [esp + 0x14], ecx
jbe 0x481b1f
movzx eax, byte [ecx + ebx]
mov esi, eax
shr eax, 4
and esi, 0xf
mov si, word [esp + esi*2 + 0x2c]
and eax, 0xf
mov ax, word [esp + eax*2 + 0x2c]
mov word [ebp + edx*2 + 2], si
mov word [ebp + edx*2], ax
inc ecx
add edx, 2
cmp ecx, dword [esp + 0x14]
jb 0x481af2
xor ecx, ecx
mov word [ebp + edx*2], cx
mov byte [esp + 0x12], 1
cmp byte [esp + 0x13], 0
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x481b43
mov eax, dword [esp + 0x24]
test eax, eax
je 0x481b43
push eax
call esi
mov eax, dword [esp + 0x18]
test eax, eax
je 0x481b6a
push eax
call esi
mov eax, dword [esp + 0x20]
mov edx, dword [0x51161c]
mov dword [edx + 0xd0], eax
mov al, byte [esp + 0x12]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
mov ecx, dword [0x51161c]
mov edx, dword [esp + 0x20]
mov al, byte [esp + 0x12]
mov dword [ecx + 0xd0], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret
pop edi
pop esi
mov dword [eax + 0xd0], ebp
pop ebp
mov al, cl
pop ebx
add esp, 0x40
ret