Function at 0x47c180
Capabilities:
Set registry value

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, ecx
test eax, eax
je 0x47c42d
test edi, edi
je 0x47c42d
cmp edi, 0xfffffffe
je 0x47c42d
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [0x4d5b14]
lea edx, [esp + 0x28]
push edx
mov edx, dword [ecx + 0xd0]
mov ecx, dword [esp + 0x2c]
push 0
or edx, 0x20006
push edx
push 0
push 0x4af9bc
push 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
test ebx, ebx
jne 0x47c471
lea eax, [edi - 1]
cmp eax, 6
ja case.0x47c1ec.5
jmp dword [eax*4 + 0x47c4c8]
mov esi, dword [esp + 0x2c]
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x47c200
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
push edx
push esi
push 1
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
jmp 0x47c466
mov esi, dword [esp + 0x2c]
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x47c240
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
push edx
push esi
push 2
jmp 0x47c217
mov esi, dword [esp + 0x2c]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x47c262
sub eax, edx
sar eax, 1
mov ebx, eax
lea edx, [ebx + ebx + 4]
push edx
call fcn.004998ce
mov edi, eax
add esp, 4
test edi, edi
jne 0x47c28e
lea ebx, [eax + 0xe]
jmp 0x47c466
lea ecx, [ebx + 1]
mov eax, esi
call fcn.0047f750
xor eax, eax
mov word [edi + ebx*2 + 2], ax
test ebx, ebx
je 0x47c2b2
cmp word [edi + ebx*2 - 2], 0xa
jne 0x47c2b2
dec ebx
xor ecx, ecx
mov word [edi + ebx*2], cx
cmp word [edi], 0
mov eax, edi
je 0x47c2d4
lea ebx, [ebx]
cmp word [eax], 0xa
jne 0x47c2cb
xor edx, edx
mov word [eax], dx
add eax, 2
cmp word [eax], 0
jne 0x47c2c0
test ebx, ebx
je 0x47c2dd
lea eax, [ebx + 2]
jmp 0x47c2df
xor eax, eax
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
add eax, eax
push eax
push edi
push 7
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push edi
mov ebx, eax
call fcn.0049996d
add esp, 4
jmp 0x47c466
mov esi, dword [esp + 0x2c]
cmp word [esi], 0
je 0x47c31c
call fcn.00404040
mov dword [esp + 0x10], eax
jmp 0x47c324
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push 4
lea eax, [esp + 0x14]
push eax
push 4
push 0
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
jmp 0x47c466
mov eax, dword [esp + 0x2c]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x47c350
sub eax, edx
sar eax, 1
mov ebp, eax
and eax, 0x80000001
jns 0x47c36d
dec eax
or eax, 0xfffffffe
inc eax
jne case.0x47c1ec.5
mov eax, ebp
cdq
sub eax, edx
sar eax, 1
push eax
mov dword [esp + 0x18], eax
call fcn.004998ce
mov esi, eax
add esp, 4
test esi, esi
jne 0x47c395
lea ebx, [eax + 0xe]
jmp 0x47c466
xor ebx, ebx
xor edi, edi
test ebp, ebp
jle 0x47c3f6
cmp ebx, dword [esp + 0x14]
jge 0x47c3f6
xor edx, edx
lea ecx, [edx + 0x10]
jmp 0x47c3b0
mov eax, dword [esp + 0x2c]
movzx eax, word [eax + edi*2]
cmp eax, 0x30
jb 0x47c3c7
cmp eax, 0x39
ja 0x47c3c7
add eax, 0xffffffd0
jmp 0x47c3e3
cmp eax, 0x41
jb 0x47c3d6
cmp eax, 0x46
ja 0x47c3d6
add eax, 0xffffffc9
jmp 0x47c3e3
cmp eax, 0x61
jb 0x47c419
cmp eax, 0x66
ja 0x47c419
add eax, 0xffffffa9
imul eax, ecx
add edx, eax
inc edi
sub ecx, 0xf
jns 0x47c3b0
mov byte [ebx + esi], dl
inc ebx
cmp edi, ebp
jl 0x47c39d
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x24]
push ebx
push esi
push 3
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push esi
mov ebx, eax
call fcn.0049996d
add esp, 4
jmp 0x47c466
push esi
call fcn.0049996d
mov ecx, dword [esp + 0x28]
add esp, 4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, 0x57
mov eax, ebx
mov ecx, dword [0x4d5b14]
mov dword [ecx + 0x30], eax
test ebx, ebx
jne 0x47c47e
mov edx, dword [0x4d9ea8]
push 1
push ebx
push 0xffffffffffffffff
push 0x4af9cc
push edx
call fcn.00482b00
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
mov ebx, 0x57
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp ebx, 0xffffffff
jne 0x47c432
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x47c434
test byte [ecx + 0x100], 1
jne 0x47c4a7
mov eax, dword [0x4d9ea8]
push 1
push 0
push 0xffffffffffffffff
push 0x4b360c
push eax
call fcn.00482b00
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10
mov ebx, dword [esp + 0x20]
push 0x4af9bc
push 0
push 0x4b360c
call fcn.00439c30
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 0x10