Function at 0x4045f3
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
cmp byte [ebp + 0x10], 0
push esi
mov esi, ecx
je 0x404615
push str.XML_support_is_deprecated
push dword [ebp + 8]
call fcn.004051bd
pop ecx
pop ecx
jmp 0x40487f
push ebx
push edi
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x4047d6
push 5
push str.HKLM:
push edi
call fcn.0040a150
add esp, 0xc
test eax, eax
jne 0x40470f
add edi, 5
push edi
lea ecx, [ebp + 0x10]
call fcn.00401110
lea ecx, [ebp + 0x10]
call fcn.00401010
mov ebx, eax
xor edi, edi
test ebx, ebx
jle 0x404673
push edi
lea ecx, [ebp + 0x10]
call fcn.00403570
cmp al, 0x2f
jne 0x40466e
push 0x5c
push edi
lea ecx, [ebp + 0x10]
call fcn.00404355
inc edi
cmp edi, ebx
jl 0x404656
mov edi, dword [ebp + 0x10]
xor ecx, ecx
cmp edi, ecx
lea eax, [edi + 0xc]
jne 0x404684
mov eax, 0x4151e6
lea edx, [ebp - 8]
push edx
lea edx, [ebp - 4]
push edx
push ecx
push 0xf003f
push ecx
push ecx
push ecx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4047bb
mov eax, dword [esi]
xor ebx, ebx
xor edi, edi
cmp dword [eax + 4], ebx
jle 0x4046c9
mov eax, dword [eax]
push dword [ebp - 4]
mov ecx, dword [eax + edi*4]
call fcn.0040416a
mov eax, dword [esi]
inc edi
cmp edi, dword [eax + 4]
jl 0x4046b4
mov esi, dword [esi]
lea ecx, [esi + 0x10]
mov eax, dword [ecx]
cmp eax, ebx
lea esi, [eax + 0xc]
jne 0x4046dc
mov esi, 0x4151e6
call fcn.00401010
inc eax
push eax
push esi
push 1
push ebx
push ebx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp + 8]
call fcn.004050d6
push dword [ebp + 0x10]
call fcn.004011a0
jmp 0x404833
push 5
push str.HKCU:
push edi
call fcn.0040a150
add esp, 0xc
test eax, eax
jne 0x4047d6
add edi, 5
push edi
lea ecx, [ebp + 0x10]
call fcn.00401110
lea ecx, [ebp + 0x10]
call fcn.00401010
mov ebx, eax
xor edi, edi
test ebx, ebx
jle 0x404760
push edi
lea ecx, [ebp + 0x10]
call fcn.00403570
cmp al, 0x2f
jne 0x40475b
push 0x5c
push edi
lea ecx, [ebp + 0x10]
call fcn.00404355
inc edi
cmp edi, ebx
jl 0x404743
mov edi, dword [ebp + 0x10]
xor ecx, ecx
cmp edi, ecx
lea eax, [edi + 0xc]
jne 0x404771
mov eax, 0x4151e6
lea edx, [ebp - 8]
push edx
lea edx, [ebp - 4]
push edx
push ecx
push 0xf003f
push ecx
push ecx
push ecx
push eax
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x4047bb
mov eax, dword [esi]
xor ebx, ebx
xor edi, edi
cmp dword [eax + 4], ebx
jle 0x4046c9
mov eax, dword [eax]
push dword [ebp - 4]
mov ecx, dword [eax + edi*4]
call fcn.0040416a
mov eax, dword [esi]
inc edi
cmp edi, dword [eax + 4]
jl 0x4047a1
jmp 0x4046c9
push str.cant_set_registry_key
push dword [ebp + 8]
call fcn.004051bd
push edi
call fcn.004011a0
add esp, 0xc
jmp 0x40487d
mov ebx, dword [esi + 5]
test ebx, ebx
mov dword [ebp + 0x10], ebx
je 0x4047e2
inc dword [ebx]
test edi, edi
je 0x4047f2
push edi
lea ecx, [ebp + 0x10]
call fcn.004013b0
mov ebx, dword [ebp + 0x10]
mov ecx, dword [esi]
and dword [ebp + 0xc], 0
push 0
lea eax, [ebp + 0xc]
push eax
call fcn.00404482
test ebx, ebx
lea eax, [ebx + 0xc]
jne 0x40480f
mov eax, 0x4151e6
push eax
lea ecx, [ebp + 0xc]
call fcn.004042db
test al, al
je 0x404836
mov ecx, dword [ebp + 8]
call fcn.004050d6
push dword [ebp + 0xc]
call fcn.004011a0
push ebx
call fcn.004011a0
pop ecx
pop ecx
jmp 0x40487d
lea eax, [ebp + 0x10]
push eax
lea eax, [ebp - 4]
push str.cant_write_to_file
push eax
call fcn.004043fd
mov eax, dword [eax]
add esp, 0xc
test eax, eax
je 0x404856
add eax, 0xc
jmp 0x40485b
mov eax, 0x4151e6
push eax
push dword [ebp + 8]
call fcn.004051bd
push dword [ebp - 4]
call fcn.004011a0
push dword [ebp + 0xc]
call fcn.004011a0
push ebx
call fcn.004011a0
add esp, 0x14
pop edi
pop ebx
mov eax, dword [ebp + 8]
pop esi
leave
ret 0xc