Function at 0x40e4c0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4204e8
mov eax, dword fs:[0]
push eax
sub esp, 0x120
push ebx
push esi
push edi
mov eax, dword [0x42a42c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], ecx
xor esi, esi
mov dword [ebp - 4], esi
mov eax, dword [0x429014]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp + 8]
push 0x5c
push ecx
mov byte [ebp - 4], 3
call fcn.0041111b
add esp, 8
cmp eax, esi
je 0x40e51d
sub eax, dword [ebp + 8]
sar eax, 1
mov edi, eax
jns 0x40e53b
lea edx, [ebp + 8]
push edx
lea ecx, [ebp - 0x1c]
call fcn.0040dfe0
push 0x421ed4
lea ecx, [ebp + 8]
call fcn.004096e0
jmp 0x40e5d1
lea eax, [edi + 1]
push eax
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp + 8]
call fcn.0040e3e0
push eax
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 4
call fcn.0040dfe0
mov eax, dword [ebp - 0x14]
lea edx, [eax - 0xc]
mov byte [ebp - 4], 3
cmp edx, dword [0x429010]
je 0x40e587
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40e587
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff4
push eax
call fcn.00410a7b
add esp, 4
push edi
push esi
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp + 8]
call fcn.0040e340
push eax
lea ecx, [ebp + 8]
mov byte [ebp - 4], 5
call fcn.0040dfe0
mov eax, dword [ebp - 0x14]
lea ecx, [eax - 0xc]
mov byte [ebp - 4], 3
cmp ecx, dword [0x429010]
je 0x40e5d1
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40e5d1
mov eax, dword [ebp - 0x14]
add eax, 0xfffffff4
push eax
call fcn.00410a7b
add esp, 4
mov edx, dword [0x429014]
mov dword [ebp - 0x14], edx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push 0x42226c
mov byte [ebp - 4], 6
call ebx
mov edi, eax
push edi
lea ecx, [ebp - 0x14]
call fcn.00408520
cmp eax, esi
je 0x40e627
mov ebx, dword [ebp - 0x14]
lea esi, [edi + edi]
lea eax, [esi + 2]
cmp eax, esi
jb 0x40e616
push esi
push 0x42226c
push ebx
call fcn.00411da0
add esp, 0xc
xor ecx, ecx
mov dword [ebx - 8], edi
mov word [esi + ebx], cx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
xor esi, esi
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + 0x48]
push eax
mov eax, dword [eax - 8]
push eax
lea ecx, [ebp - 0x14]
call fcn.00407ec0
push 0x422268
push 0x422268
call ebx
push eax
lea ecx, [ebp - 0x14]
call fcn.00407ec0
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 8]
push eax
push ecx
lea ecx, [ebp - 0x14]
call fcn.00407ec0
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
mov ecx, dword [ebp - 0x14]
lea edx, [ebp - 0x28]
push edx
lea eax, [ebp - 0x18]
push eax
push esi
push 0x2001f
push esi
push esi
push esi
push ecx
push SysReAllocString
mov byte [ebp - 4], 7
mov dword [ebp - 0x18], esi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, esi
jne 0x40e701
mov ax, word [ebp + 0xc]
mov edi, dword [ebp - 0x18]
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x20], esi
cmp ax, 8
jne 0x40e7a7
mov edx, dword [ebp + 0x14]
push edx
lea ecx, [ebp - 0x12c]
call fcn.004085a0
mov esi, dword [eax]
xor eax, eax
test esi, esi
setne al
test eax, eax
je 0x40e6db
push esi
call ebx
mov ecx, dword [ebp - 0x1c]
lea eax, [eax + eax + 2]
push eax
push esi
push 1
push 0
push ecx
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x12c]
lea edx, [ebp - 0x128]
cmp eax, edx
je 0x40e6f4
push eax
call fcn.00410d3e
add esp, 4
xor esi, esi
cmp edi, esi
je 0x40e701
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x14]
lea eax, [esi - 0xc]
mov byte [ebp - 4], 3
cmp eax, dword [0x429010]
je 0x40e72a
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40e72a
push esi
call fcn.00410a7b
add esp, 4
mov esi, dword [ebp - 0x1c]
lea ecx, [esi - 0xc]
mov byte [ebp - 4], 2
cmp ecx, dword [0x429010]
je 0x40e753
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40e753
push esi
call fcn.00410a7b
add esp, 4
mov dword [ebp - 4], 1
mov eax, dword [ebp + 8]
lea edx, [eax - 0xc]
mov byte [ebp - 4], 0
cmp edx, dword [0x429010]
je 0x40e789
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40e789
mov eax, dword [ebp + 8]
add eax, 0xfffffff4
push eax
call fcn.00410a7b
add esp, 4
lea ecx, [ebp + 0xc]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x14
cmp ax, 3
jne 0x40e6f6
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp + 0x14]
push 4
lea ecx, [ebp - 0x18]
push ecx
push 4
push esi
push edx
push edi
mov dword [ebp - 0x18], eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x40e6f6