Function at 0x40c840
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x58f340
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
mov eax, dword [0x6017f8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
cmp byte [ebx + 0xeb9], 0
je 0x40c87d
mov eax, 2
jmp 0x40c888
xor eax, eax
cmp byte [ebx + 0xeba], al
setne al
mov ecx, dword [ebx + 0xe74]
mov dword [ebp - 0x44], eax
test ecx, ecx
je 0x40c8ae
mov eax, dword [ecx]
mov eax, dword [eax + 8]
call eax
test al, al
je 0x40c8ae
lea esi, [ebx + 0xc30]
lea edi, [ebx + 0xa30]
jmp 0x40c8dc
lea esi, [ebx + 0xc30]
push 0
mov ecx, esi
call fcn.0042f500
lea edi, [ebx + 0xa30]
push 0
mov ecx, edi
call fcn.0042f500
mov ecx, dword [ebx + 0xe34]
push 0
mov ecx, dword [ecx + 0x5c]
call fcn.0042f500
cmp byte [ebx + 0xeb9], 0
mov ecx, esi
je 0x40c947
push 0
call fcn.0042f500
push 1
mov ecx, edi
call fcn.0042f500
push 0
mov ecx, dword [ebx + 0xe34]
mov ecx, dword [ecx + 0x5c]
call fcn.0042f500
mov ecx, dword [ebx + 0xe74]
test ecx, ecx
je 0x40c93a
call fcn.0041ed60
test eax, eax
je 0x40c93a
mov ecx, dword [ebx + 0xe74]
call fcn.0041ed60
cmp eax, 3
je 0x40c93a
mov ecx, dword [ebx + 0xe74]
call fcn.0041ed60
cmp eax, 4
jne 0x40c986
mov eax, dword [ebp - 0x44]
xor ecx, ecx
cmp eax, 1
cmove eax, ecx
jmp 0x40c989
push 1
call fcn.0042f500
push 1
mov ecx, edi
call fcn.0042f500
mov ecx, dword [ebx + 0xe74]
test ecx, ecx
je 0x40c8f7
call fcn.0041ed60
cmp eax, 1
je 0x40c97f
mov ecx, dword [ebx + 0xe74]
call fcn.0041ed60
cmp eax, 2
jne 0x40c8f7
push 1
jmp 0x40c8f9
mov eax, dword [ebp - 0x44]
mov ecx, dword [ebx + 0xe30]
sub eax, 1
je 0x40c9d1
sub eax, 1
je 0x40c9b5
mov eax, dword [ecx + 0x298]
mov esi, dword [eax*4 + 0x5ff1e8]
mov dword [ebp - 0x44], esi
mov dword [ebx + 0xe38], 0
jmp 0x40c9eb
mov eax, dword [ecx + 0x2a0]
mov esi, dword [eax*4 + 0x5ff1e8]
mov dword [ebp - 0x44], esi
mov dword [ebx + 0xe38], 2
jmp 0x40c9eb
mov eax, dword [ecx + 0x29c]
mov eax, dword [eax*4 + 0x5ff1e8]
mov dword [ebp - 0x44], eax
mov dword [ebx + 0xe38], 1
lea eax, [ecx + 0x20]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 4], 0
call fcn.004271bf
mov ecx, eax
test ecx, ecx
je 0x40ccfa
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x48], eax
push dword [ebx + 0xe38]
lea eax, [ebp - 0x48]
mov byte [ebp - 4], 1
push 0x5a5344
push eax
call fcn.004076b0
add esp, 0xc
lea ecx, [ebp - 0x54]
push 0x2001f
push 0x5a4d18
push SysReAllocString
call fcn.00410060
mov esi, dword [ebp - 0x48]
test eax, eax
jne 0x40cab5
test esi, esi
je 0x40ca9b
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ca70
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
mov eax, dword [ebp - 0x54]
push esi
push 1
push 0
push str.LastView
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x40caae
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], 0
xor edi, edi
nop word [eax + eax]
mov eax, dword [ebx + 0xe34]
push 0
push 0
push 0xb
mov eax, dword [edi + eax]
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
add edi, 4
cmp edi, 0x68
jl 0x40cac0
lea ecx, [ebx + 0xe3c]
call fcn.0043586e
mov ecx, dword [ebx + 0xe74]
test ecx, ecx
je 0x40cb16
mov eax, dword [ecx]
mov eax, dword [eax + 0x64]
call eax
test al, al
je 0x40cb16
mov eax, dword [ebx + 0xe30]
mov eax, dword [eax + 0x2a4]
movzx eax, word [eax*4 + 0x5ff1e8]
jmp 0x40cb1c
mov eax, dword [ebp - 0x44]
movzx eax, ax
push eax
mov dword [ebp - 0x44], eax
call fcn.0040b3c0
add esp, 4
lea ecx, [ebx + 0xe3c]
push eax
call fcn.004356aa
lea eax, [ebp - 0x20]
push eax
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_GetClientRect]
lea eax, [ebp - 0x30]
push eax
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [ebx + 0xe30]
mov edx, dword [ebp - 0x1c]
sub edx, dword [ebp - 0x14]
sub edx, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x20]
mov eax, dword [ecx + 0x1c]
sub edi, dword [ebp - 0x18]
add edx, dword [ebp - 0x24]
sub edi, dword [ebp - 0x30]
add eax, edx
add edi, dword [ebp - 0x28]
push 0x206
push eax
mov eax, dword [ecx + 0x18]
mov ecx, ebx
add eax, edi
push eax
push 0
push 0
push 0
call fcn.0042fff2
mov eax, dword [ebx + 0xe30]
lea ecx, [ebx + 0xcb0]
push 5
push 0
push 0
mov eax, dword [eax + 0x1c]
sub eax, 0x2c
push eax
push 0x64
push 0
call fcn.0042fff2
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebx + 0xe44]
je 0x40cbd3
push 1
push 0
push dword [ebx + 0x20]
mov dword [ebx + 0xe44], eax
call dword [sym.imp.USER32.dll_InvalidateRect]
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_UpdateWindow]
mov esi, dword [ebp - 0x58]
xor edi, edi
nop dword [eax + eax]
mov eax, dword [ebx + 0xe34]
lea ecx, [ebp - 0x40]
push ecx
mov eax, dword [edi + eax]
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_GetWindowRect]
mov ecx, dword [ebp - 0x34]
sub ecx, dword [ebp - 0x3c]
mov eax, dword [esi + 8]
test eax, eax
jne 0x40cc09
mov eax, dword [ebp - 0x38]
sub eax, dword [ebp - 0x40]
push 4
push ecx
mov ecx, dword [ebx + 0xe34]
push eax
push dword [esi + 4]
push dword [esi]
mov ecx, dword [ecx + edi]
push 0
call fcn.0042fff2
add edi, 4
add esi, 0xc
cmp edi, 0x68
jl 0x40cbe0
mov esi, dword [ebp - 0x48]
xor edi, edi
nop dword [eax]
nop word [eax + eax]
movsd xmm0, qword [0x5a2b78]
movd xmm1, edi
cvtdq2pd xmm1, xmm1
call fcn.0056e760
call fcn.00569771
mov ecx, dword [ebx + 0xe30]
test dword [ecx + 0x14], eax
je 0x40cc93
mov eax, dword [ebx + 0xe34]
push 0
push 1
push 0xb
mov eax, dword [eax + edi*4]
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [ebx + 0xe34]
push 1
push 0
mov eax, dword [eax + edi*4]
push dword [eax + 0x20]
call dword [sym.imp.USER32.dll_InvalidateRect]
inc edi
cmp edi, 0x1a
jl 0x40cc40
push 1
push 0
push dword [ebx + 0xcd0]
call dword [sym.imp.USER32.dll_InvalidateRect]
push dword [ebx + 0x20]
call dword [sym.imp.USER32.dll_UpdateWindow]
mov byte [ebp - 4], 0
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40ccce
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x40ccdc
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0056918e
mov esp, ebp
pop ebp
ret 4
push 0x80004005
call fcn.004056a0
int3