Function at 0x40d370
Capabilities:
Set registry value

Disassembly:
sub esp, 0x18
mov eax, 0x41f2bd
mov dword [esp + 8], 0x80004005
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d383
push esi
sub eax, edx
mov esi, eax
push edi
push esi
call fcn.00401db0
mov edi, dword [eax + 0x10]
mov ecx, esi
mov edx, ecx
shr ecx, 2
mov esi, 0x41f2bd
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x28]
mov cl, byte [edi]
add esp, 4
cmp cl, 0x2f
mov dword [esp + 8], eax
je 0x40d432
cmp cl, 0x5c
je 0x40d432
mov ecx, dword [0x42b61c]
test ecx, ecx
je 0x40d3f8
mov edx, dword [ecx + 0x10]
test edx, edx
je 0x40d3f8
mov eax, edx
lea esi, [eax + 1]
jmp 0x40d3e0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d3e0
sub eax, esi
push eax
push edx
lea ecx, [esp + 0x10]
call fcn.00404730
mov eax, dword [esp + 8]
test eax, eax
je 0x40d432
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x40d432
push 0x421fa4
lea ecx, [esp + 0xc]
call fcn.0040d010
test al, al
jne 0x40d432
push 0x422aec
lea ecx, [esp + 0xc]
call fcn.0040d010
test al, al
jne 0x40d432
push 0x2f
lea ecx, [esp + 0xc]
call fcn.00405be0
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d437
sub eax, edx
push eax
push edi
lea ecx, [esp + 0x10]
call fcn.00404730
push 0x422aec
push 0x421fa4
lea ecx, [esp + 0x10]
call fcn.00401f10
mov eax, 0x422aec
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d466
push ebx
mov ebx, dword [esp + 0xc]
sub eax, edx
test ebx, ebx
push ebp
je 0x40d4bd
cmp dword [ebx + 8], eax
jl 0x40d4b5
push eax
mov eax, dword [ebx + 0x10]
push 0x422aec
push eax
call fcn.00412bc0
add esp, 0xc
neg eax
sbb al, al
inc al
test al, al
je 0x40d4b5
mov eax, dword [ebx + 0x10]
mov ecx, dword [ebx + 8]
push ecx
lea edx, [eax + 1]
push edx
push eax
call fcn.00412880
mov eax, dword [ebx + 8]
add esp, 0xc
dec eax
mov dword [ebx + 8], eax
mov ebp, dword [ebx + 8]
mov eax, dword [ebx + 0x10]
jmp 0x40d4c1
xor ebp, ebp
xor eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
inc ebp
push ebp
push eax
push 0
push 0xfde9
call edi
mov dword [esp + 0x2c], eax
add eax, eax
push eax
call fcn.004121c0
add esp, 4
test ebx, ebx
mov esi, eax
je 0x40d4f1
mov ebx, dword [ebx + 0x10]
jmp 0x40d4f3
xor ebx, ebx
mov ecx, dword [esp + 0x2c]
push ecx
push esi
push ebp
push ebx
push 0
push 0xfde9
call edi
push 0x5c
push esi
call fcn.0041322b
mov ebx, dword [esp + 0x38]
add esp, 8
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 0xfde9
mov dword [esp + 0x3c], eax
mov word [eax], 0
call edi
mov ebp, eax
lea eax, [ebp + ebp + 2]
push eax
mov dword [esp + 0x24], eax
call fcn.004121c0
mov ecx, eax
mov eax, ebx
lea edx, [eax + 1]
add esp, 4
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x1c], edx
mov edi, edi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40d550
sub eax, dword [esp + 0x1c]
inc ebp
push ebp
push ecx
inc eax
push eax
push ebx
push 0
push 0xfde9
call edi
push 0
lea eax, [esp + 0x18]
push eax
push 0
push 0x20006
push 0
push 0x422ae8
push 0
push esi
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
pop ebp
pop ebx
jne 0x40d5d7
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x10]
push edx
push 1
push eax
mov eax, dword [esp + 0x2c]
add eax, 2
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x40d5c6
mov edx, dword [esp + 0xc]
push edx
xor edi, edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40d5db
mov edx, dword [esp + 0xc]
mov edi, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40d5db
mov edi, dword [esp + 0x10]
push esi
call fcn.0041249e
mov eax, dword [esp + 0x28]
push eax
call fcn.0041249e
mov ecx, dword [esp + 0x10]
add esp, 8
test ecx, ecx
je 0x40d60b
mov eax, dword [ecx + 4]
test eax, eax
js 0x40d60b
dec eax
test eax, eax
mov dword [ecx + 4], eax
jne 0x40d60b
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, edi
pop edi
pop esi
add esp, 0x18
ret