Function at 0x40d540
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x53f571
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x1124
call fcn.00519640
mov eax, dword [0x58a710]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
mov dword [ebp - 0x1128], esi
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x1134], eax
lea eax, [ebp - 0x1014]
push eax
mov dword [ebp - 0x1130], esi
mov dword [ebp - 0x1124], ebx
mov dword [ebp - 0x111c], edi
mov dword [ebp - 0x1120], 0
call fcn.0040e8c0
test eax, eax
js 0x40d976
lea eax, [ebp - 0x1120]
push eax
lea eax, [ebp - 0x1014]
push eax
call fcn.00410f80
add esp, 8
test eax, eax
jne 0x40d5e1
mov eax, 0x80020009
jmp 0x40d976
mov ecx, esi
call fcn.00410420
lea eax, [ebp - 0x1014]
mov ecx, esi
push eax
call fcn.0040e8c0
test eax, eax
js 0x40d976
movzx eax, word [ebp - 0x1120]
cmp eax, 0x13
ja 0x40d856
je 0x40d764
cmp eax, 8
je 0x40d74c
cmp eax, 0x11
jne 0x40d960
lea ebx, [ebp - 0x1014]
lea ecx, [ebx + 1]
nop
mov al, byte [ebx]
inc ebx
test al, al
jne 0x40d630
sub ebx, ecx
mov dword [ebp - 0x112c], ebx
test bl, 1
jne 0x40d6b3
mov eax, ebx
mov dword [ebp - 0x1118], 0
cdq
sub eax, edx
mov esi, eax
sar esi, 1
mov dword [ebp - 0x1120], esi
mov dword [ebp - 4], 4
lea ecx, [ebp - 0x1118]
push esi
mov byte [ebp - 4], 5
call fcn.0040da30
jmp 0x40d694
mov eax, dword [ebp - 0x1118]
test eax, eax
jne 0x40d6bd
lea eax, [ebp - 0x1114]
test eax, eax
je 0x40d6b3
lea ecx, [ebp - 0x1118]
call fcn.0040e270
mov eax, 0x80004005
jmp 0x40d976
push esi
push 0
push eax
call fcn.0051d400
add esp, 0xc
xor edi, edi
test ebx, ebx
jle 0x40d709
nop
movzx eax, byte [ebp + edi - 0x1014]
mov esi, edi
shr esi, 1
add esi, dword [ebp - 0x1118]
push eax
call fcn.0040dd00
mov edx, edi
mov ecx, 4
and edx, 1
inc edi
shl edx, 2
add esp, 4
sub ecx, edx
shl al, cl
or byte [esi], al
cmp edi, ebx
jl 0x40d6d0
mov esi, dword [ebp - 0x1120]
mov ecx, dword [ebp - 0x1124]
push esi
push dword [ebp - 0x1118]
push 3
push 0
push dword [ebp - 0x111c]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
lea eax, [ebp - 0x1114]
cmp dword [ebp - 0x1118], eax
je 0x40d94b
lea ecx, [ebp - 0x1118]
call fcn.0040e270
jmp 0x40d94b
push 1
lea eax, [ebp - 0x1014]
mov ecx, ebx
push eax
push edi
call fcn.00410250
mov esi, eax
jmp 0x40d94b
mov dword [ebp - 0x111c], 0
lea ecx, [ebp - 0x1014]
mov dword [ebp - 4], 3
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d780
sub ecx, edx
push 2
lea eax, [ecx + 1]
push eax
mov dword [ebp - 0x1120], eax
lea eax, [ebp - 0x1120]
push eax
call fcn.0040c0e0
add esp, 0xc
test eax, eax
js 0x40d841
mov esi, dword [ebp - 0x1120]
cmp esi, 0x400
jg 0x40d7d5
push esi
call fcn.00411060
add esp, 4
test al, al
je 0x40d7d5
mov eax, esi
call fcn.00519bc0
mov dword [ebp - 0x10], esp
mov eax, esp
jmp 0x40d7e1
push esi
lea ecx, [ebp - 0x111c]
call fcn.0040d9a0
push 3
shr esi, 1
lea ecx, [ebp - 0x1014]
push esi
push ecx
push eax
call fcn.0040db80
test eax, eax
je 0x40d841
lea ecx, [ebp - 0x112c]
push ecx
push 0
push 0
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
mov esi, eax
test esi, esi
jns 0x40d821
lea ecx, [ebp - 0x111c]
call fcn.0040cbe0
mov eax, esi
jmp 0x40d976
push dword [ebp - 0x112c]
mov ecx, ebx
push edi
call fcn.004101d0
lea ecx, [ebp - 0x111c]
mov esi, eax
call fcn.0040cbe0
jmp 0x40d94b
lea ecx, [ebp - 0x111c]
call fcn.0040cbe0
mov eax, 0x8007000e
jmp 0x40d976
cmp eax, 0x4008
jne 0x40d960
lea ecx, [ebp - 0x1014]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d870
sub ecx, edx
mov dword [ebp - 0x1118], 0
add ecx, 2
push ecx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x1118]
mov byte [ebp - 4], 1
call fcn.0040da30
jmp 0x40d8b1
mov edi, dword [ebp - 0x1118]
test edi, edi
je 0x40d931
cmp byte [ebp - 0x1014], 0
lea esi, [ebp - 0x1014]
je 0x40d90b
mov ebx, dword [sym.imp.USER32.dll_CharNextA]
push esi
call ebx
mov cl, byte [esi]
cmp cl, 0x5c
jne 0x40d8e9
cmp byte [eax], 0x30
jne 0x40d8e9
push eax
mov byte [edi], 0
call ebx
mov esi, eax
jmp 0x40d905
mov byte [edi], cl
movzx eax, byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x40d904
mov al, byte [esi + 1]
inc esi
inc edi
test al, al
je 0x40d90b
mov byte [edi], al
inc esi
inc edi
cmp byte [esi], 0
jne 0x40d8d0
mov ecx, dword [ebp - 0x1124]
mov word [edi], 0
push dword [ebp - 0x1118]
push dword [ebp - 0x111c]
call fcn.004101f0
mov edi, dword [ebp - 0x1118]
mov esi, eax
jmp 0x40d936
mov esi, 0xe
lea eax, [ebp - 0x1114]
cmp edi, eax
je 0x40d94b
lea ecx, [ebp - 0x1118]
call fcn.0040e270
test esi, esi
je 0x40d95a
push esi
call fcn.0040dc30
add esp, 4
jmp 0x40d976
mov esi, dword [ebp - 0x1128]
push dword [ebp - 0x1134]
mov ecx, esi
call fcn.0040e8c0
xor ecx, ecx
test eax, eax
cmovs ecx, eax
mov eax, ecx
lea esp, [ebp - 0x1144]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005193a0
mov esp, ebp
pop ebp
ret 0xc