Function at 0x405581
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x111c
call fcn.0040b0f2
mov eax, dword [0x4110e4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
and dword [ebp - 0x110c], 0
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, ecx
mov dword [ebp - 0x111c], eax
lea eax, [ebp - 0x1004]
push eax
mov dword [ebp - 0x1114], esi
mov dword [ebp - 0x1118], ebx
mov dword [ebp - 0x1110], edi
call fcn.00405d7f
test eax, eax
js 0x4059c0
lea edx, [ebp - 0x110c]
lea ecx, [ebp - 0x1004]
call fcn.004053e4
test eax, eax
jne 0x4055f8
mov eax, 0x80020009
jmp 0x4059c0
mov ecx, esi
call fcn.004064e0
lea eax, [ebp - 0x1004]
mov ecx, esi
push eax
call fcn.00405d7f
test eax, eax
js 0x4059c0
movzx eax, word [ebp - 0x110c]
sub eax, 8
je 0x405979
sub eax, 9
je 0x405847
dec eax
sub eax, 1
je 0x40576a
sub eax, 0x3ff5
jne 0x4059aa
lea ecx, [ebp - 0x1004]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40564c
and dword [ebp - 0x1108], 0
sub ecx, edx
add ecx, 2
call fcn.00405565
cmp eax, 0x100
jbe 0x40567f
push eax
lea ecx, [ebp - 0x1108]
call fcn.00404dfa
mov esi, dword [ebp - 0x1108]
jmp 0x40568b
lea esi, [ebp - 0x1104]
mov dword [ebp - 0x1108], esi
test esi, esi
je 0x405738
cmp byte [ebp - 0x1004], 0
lea edi, [ebp - 0x1004]
je 0x4056e3
mov ebx, dword [sym.imp.USER32.dll_CharNextA]
push edi
call ebx
mov cl, byte [edi]
cmp cl, 0x5c
jne 0x4056c2
cmp byte [eax], 0x30
jne 0x4056c2
mov byte [esi], 0
inc esi
push eax
call ebx
mov edi, eax
jmp 0x4056de
mov byte [esi], cl
movzx eax, byte [edi]
push eax
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x4056dc
inc esi
inc edi
mov al, byte [edi]
test al, al
je 0x4056e3
mov byte [esi], al
inc esi
inc edi
cmp byte [edi], 0
jne 0x4056a8
mov word [esi], 0
mov esi, dword [ebp - 0x1108]
test esi, esi
jne 0x4056f6
push 0xd
jmp 0x40573a
xor edx, edx
mov edi, esi
mov ecx, edi
lea ebx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4056ff
sub ecx, ebx
lea eax, [ecx + 1]
add edi, eax
add edx, eax
cmp eax, 1
jne 0x4056fa
mov eax, dword [ebp - 0x1118]
push edx
push esi
push 7
push 0
push dword [ebp - 0x1110]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, dword [ebp - 0x1108]
mov edi, eax
jmp 0x40573b
push 0xe
pop edi
lea eax, [ebp - 0x1104]
cmp esi, eax
je 0x405750
lea ecx, [ebp - 0x1108]
call fcn.00404dd1
mov esi, dword [ebp - 0x1114]
test edi, edi
je 0x4059aa
mov ecx, edi
call fcn.00405d71
jmp 0x4059c0
and dword [ebp - 0x110c], 0
lea edx, [ebp - 0x1004]
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x40577a
sub edx, ecx
inc edx
push ecx
lea ecx, [ebp - 0x1110]
mov dword [ebp - 0x1110], edx
call fcn.0040545e
test eax, eax
js 0x405830
mov esi, dword [ebp - 0x1110]
cmp esi, 0x400
jg 0x4057c2
mov ecx, esi
call fcn.004054be
test al, al
je 0x4057c2
mov eax, esi
call fcn.0040b0df
mov eax, esp
jmp 0x4057ce
push esi
lea ecx, [ebp - 0x110c]
call fcn.00405526
push 3
shr esi, 1
lea edx, [ebp - 0x1004]
push esi
mov ecx, eax
call fcn.0040548b
test eax, eax
je 0x405830
lea ecx, [ebp - 0x1118]
push ecx
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov esi, eax
test esi, esi
js 0x405835
mov eax, dword [ebp - 0x1118]
push 4
mov dword [ebp - 0x1110], eax
lea eax, [ebp - 0x1110]
push eax
push 4
push 0
push edi
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea ecx, [ebp - 0x110c]
mov edi, eax
call fcn.00405444
jmp 0x405750
mov esi, 0x8007000e
lea ecx, [ebp - 0x110c]
call fcn.00405444
mov eax, esi
jmp 0x4059c0
lea ebx, [ebp - 0x1004]
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x405850
sub ebx, ecx
test bl, 1
je 0x405868
mov eax, 0x80004005
jmp 0x4059c0
and dword [ebp - 0x1108], 0
mov eax, ebx
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov ecx, edi
call fcn.00405565
cmp eax, 0x100
jbe 0x40589a
push eax
lea ecx, [ebp - 0x1108]
call fcn.00404dfa
mov eax, dword [ebp - 0x1108]
jmp 0x4058a6
lea eax, [ebp - 0x1104]
mov dword [ebp - 0x1108], eax
test eax, eax
jne 0x4058c1
lea eax, [ebp - 0x1104]
test eax, eax
je 0x40585e
lea ecx, [ebp - 0x1108]
call fcn.00404dd1
jmp 0x40585e
push edi
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
xor esi, esi
test ebx, ebx
jle 0x405936
mov eax, esi
cdq
sub eax, edx
mov dl, byte [ebp + esi - 0x1004]
sar eax, 1
add eax, dword [ebp - 0x1108]
mov dword [ebp - 0x110c], eax
cmp dl, 0x30
jl 0x405918
cmp dl, 0x39
jle 0x405913
cmp dl, 0x40
jle 0x405918
cmp dl, 0x46
jle 0x40590e
mov al, dl
sub al, 0x61
cmp al, 5
ja 0x405918
sub dl, 0x57
jmp 0x40591a
sub dl, 0x37
jmp 0x40591a
sub dl, 0x30
jmp 0x40591a
xor dl, dl
mov eax, esi
and eax, 1
shl eax, 2
push 4
pop ecx
sub ecx, eax
mov eax, dword [ebp - 0x110c]
shl dl, cl
or byte [eax], dl
inc esi
cmp esi, ebx
jl 0x4058d3
mov eax, dword [ebp - 0x1118]
push edi
push dword [ebp - 0x1108]
push 3
push 0
push dword [ebp - 0x1110]
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
lea eax, [ebp - 0x1104]
cmp dword [ebp - 0x1108], eax
je 0x405750
lea ecx, [ebp - 0x1108]
call fcn.00404dd1
jmp 0x405750
lea ecx, [ebp - 0x1004]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405982
sub ecx, edx
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x1004]
push eax
push 1
push 0
push edi
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, eax
jmp 0x405756
push dword [ebp - 0x111c]
mov ecx, esi
call fcn.00405d7f
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
lea esp, [ebp - 0x1128]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00409ef7
mov esp, ebp
pop ebp
ret 0xc