Function at 0x40e331
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [0x41b014]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [0x401260]
push ebx
push esi
push edi
call fcn.0040dc53
lea ecx, [ebp - 0x814]
mov dword [ebp - 0x814], eax
push ecx
push 2
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40e5b7
lea ecx, [ebp - 0x80c]
call fcn.0040eddd
test eax, eax
je 0x40e59d
dec dword [0x45ce6c]
push 0x20
pop ebx
push 0x5c
pop ecx
call fcn.0040ef20
mov esi, 0x401c24
test eax, eax
jne 0x40e3a9
mov esi, dword [0x401260]
movzx eax, word [esi]
test ax, ax
je 0x40e3cd
mov ecx, eax
call fcn.0040ef20
lea esi, [esi + 2]
test eax, eax
je 0x40e593
movzx eax, word [esi]
mov ecx, eax
test ax, ax
jne 0x40e3b3
push 0x5c
pop ecx
call fcn.0040ef20
mov edi, eax
test edi, edi
je 0x40e593
xor esi, esi
jmp 0x40e409
mov cx, word [ebp - 0x80c]
cmp cx, bx
je 0x40e41c
call fcn.0040ef50
test eax, eax
jne 0x40e41c
cmp esi, 0x3ff
jae 0x40e41a
mov word [ebp + esi*2 - 0x808], cx
inc esi
lea ecx, [ebp - 0x80c]
call fcn.0040eddd
test eax, eax
jne 0x40e3e3
jmp 0x40e41c
xor edi, edi
test edi, edi
je 0x40e593
add esi, esi
mov edi, 0x100
cmp esi, 0x800
jae 0x40e5d2
xor eax, eax
mov word [ebp + esi - 0x808], ax
call fcn.0040ed67
push 0x3d
pop ecx
call fcn.0040ef20
test eax, eax
je 0x40e459
mov ecx, ebx
call fcn.0040ef20
push 0x200
xor eax, eax
push 0x40
mov dword [ebp - 0x810], eax
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
xor ebx, ebx
test esi, esi
setne bl
jmp 0x40e509
test ebx, ebx
je 0x40e576
mov dx, word [ebp - 0x80c]
mov cx, dx
call fcn.0040ef50
mov ecx, dword [ebp - 0x810]
test eax, eax
jne 0x40e522
lea eax, [edi - 1]
cmp ecx, eax
jb 0x40e4fa
lea eax, [edi + 0x100]
cmp eax, edi
jb 0x40e4bc
mov edx, eax
mov dword [ebp - 0x818], eax
jmp 0x40e4c5
or edx, 0xffffffff
mov dword [ebp - 0x818], edx
cmp eax, edi
jb 0x40e56e
push 2
lea eax, [edx + edx]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
mov ecx, dword [ebp - 0x810]
xor ebx, ebx
test eax, eax
setne bl
test eax, eax
je 0x40e522
mov edi, dword [ebp - 0x818]
mov esi, eax
mov dx, word [ebp - 0x80c]
test ebx, ebx
je 0x40e509
mov word [esi + ecx*2], dx
inc ecx
mov dword [ebp - 0x810], ecx
lea ecx, [ebp - 0x80c]
call fcn.0040eddd
test eax, eax
jne 0x40e47c
mov ecx, dword [ebp - 0x810]
test ebx, ebx
je 0x40e576
lea eax, [ebp - 0x81c]
push eax
call fcn.0040dc1e
test eax, eax
js 0x40e572
push dword [ebp - 0x81c]
mov eax, dword [ebp - 0x810]
xor ecx, ecx
push esi
push 1
mov word [esi + eax*2], cx
lea eax, [ebp - 0x808]
push eax
push dword [ebp - 0x814]
call dword [sym.imp.ADVAPI32.dll_RegSetValueW]
test eax, eax
je 0x40e580
mov dword [0x41be24], 0x84
jmp 0x40e580
xor ebx, ebx
jmp 0x40e522
xor ebx, ebx
jmp 0x40e580
mov dword [0x41be24], 0x132
test esi, esi
je 0x40e58b
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
test ebx, ebx
jne 0x40e376
call fcn.0040ed95
jmp 0x40e376
push dword [ebp - 0x814]
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
push dword [ebp - 0x814]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40e5c1
mov dword [0x41be24], 0x83
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00419cc0
mov esp, ebp
pop ebp
ret
call fcn.00419e0a
int3