Function at 0x477480
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
sub esp, 0x234
mov eax, dword [ebp + 8]
mov dword [esp + 0x20], ecx
push ebx
push esi
push edi
mov edi, edx
test eax, eax
jne 0x4774ad
push 0x4ce240
call fcn.00429450
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 4
je 0x4775c5
mov eax, dword [edi + 8]
cmp eax, 4
ja case.0x4774c2.3
jmp dword [eax*4 + 0x477848]
mov ecx, dword [edi]
push 1
call fcn.00414010
mov ebx, dword [edi]
mov dword [esp + 0x1c], eax
cmp byte [ebx + 0x17], 0
jne 0x4774e8
mov ecx, dword [ebx + 0xc]
call fcn.00414070
mov ebx, eax
test byte [ebx + 0x15], 1
je 0x4774f5
mov ecx, ebx
call fcn.00413cd0
mov ebx, dword [ebx + 0xc]
shr ebx, 1
jmp 0x4775d1
mov ebx, dword [edi + 4]
mov ecx, dword [edi]
mov dword [esp + 0x1c], ecx
cmp ebx, 0xffffffff
je 0x4775a3
jmp 0x4775d1
push 0xa
lea eax, [esp + 0x44]
push eax
push dword [edi + 4]
push dword [edi]
call fcn.004998fd
add esp, 0x10
mov ecx, eax
jmp 0x4775a3
movsd xmm0, qword [edi]
lea eax, [esp + 0x40]
sub esp, 8
movsd qword [esp], xmm0
push str._.17g
push 0x100
push eax
call fcn.0047a7e0
add esp, 0x14
mov ebx, eax
lea eax, [esp + 0x40]
push 0x4d11d4
push eax
call fcn.0049fc87
add esp, 8
cmp eax, ebx
jne 0x477598
lea ecx, [ebx + 3]
cmp ecx, 0x100
jg 0x477598
movzx eax, word [esp + ebx*2 + 0x3e]
push eax
call fcn.0049861f
add esp, 4
test eax, eax
je 0x477598
xor eax, eax
mov dword [esp + ebx*2 + 0x40], 0x30002e
mov word [esp + ebx*2 + 0x44], ax
add ebx, 2
lea eax, [esp + 0x40]
jmp 0x4775cd
mov ecx, 0x4b431c
mov ebx, ecx
lea edx, [ebx + 2]
nop dword [eax + eax]
mov ax, word [ebx]
add ebx, 2
test ax, ax
jne 0x4775b0
sub ebx, edx
mov dword [esp + 0x1c], ecx
sar ebx, 1
jmp 0x4775d1
mov eax, dword [esp + 0x30]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x24]
push eax
mov eax, dword [0x4d78c8]
push 0
mov eax, dword [eax + 0x84]
or eax, 0x20006
push eax
push 0
push 0x4b431c
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov esi, eax
test esi, esi
jne 0x47780a
mov eax, dword [ebp + 8]
dec eax
cmp eax, 6
ja case.0x47761a.5
jmp dword [eax*4 + 0x47785c]
lea eax, [ebx*2 + 2]
push eax
push dword [esp + 0x20]
push 1
push 0
push dword [ebp + 0x14]
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
jmp 0x477800
lea eax, [ebx*2 + 2]
push eax
push dword [esp + 0x20]
push 2
jmp 0x47762f
lea eax, [ebx*2 + 4]
push eax
call fcn.00497ab4
mov edi, eax
add esp, 4
test edi, edi
jne 0x477673
lea esi, [eax + 0xe]
jmp 0x477800
push ebx
push dword [esp + 0x20]
push edi
call fcn.0049fc44
xor eax, eax
add esp, 0xc
mov dword [edi + ebx*2], eax
test ebx, ebx
je 0x477697
cmp word [edi + ebx*2 - 2], 0xa
jne 0x477697
dec ebx
mov word [edi + ebx*2], ax
movzx eax, word [edi]
mov ecx, edi
test ax, ax
je 0x4776bc
mov edx, eax
cmp dx, 0xa
jne 0x4776ae
xor eax, eax
mov word [ecx], ax
movzx eax, word [ecx + 2]
add ecx, 2
mov edx, eax
test ax, ax
jne 0x4776a3
lea eax, [ebx*2 + 4]
neg ebx
sbb ebx, ebx
and ebx, eax
push ebx
push edi
push 7
push 0
push dword [ebp + 0x14]
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push edi
mov esi, eax
call fcn.00497f48
add esp, 4
jmp 0x477800
mov ecx, edi
call fcn.0044f5c0
mov dword [esp + 0x34], eax
lea eax, [esp + 0x34]
push 4
push eax
push 4
jmp 0x47762f
test bl, 1
jne case.0x47761a.5
mov eax, ebx
cdq
sub eax, edx
mov esi, eax
sar esi, 1
push esi
mov dword [esp + 0x34], esi
call fcn.00497ab4
add esp, 4
mov dword [esp + 0x24], eax
test eax, eax
jne 0x477734
lea esi, [eax + 0xe]
jmp 0x477800
xor eax, eax
xor edi, edi
mov dword [esp + 0x28], eax
test ebx, ebx
jle 0x4777a3
cmp eax, esi
jge 0x4777a3
xor edx, edx
lea esi, [edx + 0x10]
nop dword [eax]
mov eax, dword [esp + 0x1c]
movzx ecx, word [eax + edi*2]
lea eax, [ecx - 0x30]
cmp ax, 9
ja 0x477766
lea eax, [ecx - 0x30]
jmp 0x477780
lea eax, [ecx - 0x41]
cmp ax, 5
ja 0x477774
lea eax, [ecx - 0x37]
jmp 0x477780
lea eax, [ecx - 0x61]
cmp ax, 5
ja 0x4777c7
lea eax, [ecx - 0x57]
imul eax, esi
inc edi
add edx, eax
sub esi, 0xf
jns 0x477750
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov esi, dword [esp + 0x30]
mov byte [eax + ecx], dl
inc eax
mov dword [esp + 0x28], eax
cmp edi, ebx
jl 0x477740
mov ebx, dword [esp + 0x24]
push eax
push ebx
push 3
push 0
push dword [ebp + 0x14]
push dword [esp + 0x34]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push ebx
mov esi, eax
call fcn.00497f48
add esp, 4
jmp 0x477800
push dword [esp + 0x24]
call fcn.00497f48
add esp, 4
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x4d78c8]
mov esi, 0x57
mov ecx, dword [esp + 0x2c]
push esi
mov dword [eax + 0x38], esi
call fcn.00429530
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, 0x57
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [0x4d78c8]
mov dword [eax + 0x38], esi
test esi, esi
je 0x477827
mov ecx, dword [esp + 0x2c]
push esi
call fcn.00429530
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x2c]
pop edi
pop esi
pop ebx
mov dword [eax + 8], 0
mov dword [eax], 0x4b431c
mov dword [eax + 4], 0
mov esp, ebp
pop ebp
ret