Function at 0x4145f0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46dbd5
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x495580]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
cmp byte [edi + 4], 0
je 0x414893
mov ecx, dword [edi]
call fcn.00414470
test al, al
je 0x41463e
mov ecx, dword [edi]
call fcn.00414e50
test al, al
je 0x414893
lea eax, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push eax
push 0x20006
push 0
push dword [0x58ec70]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x414893
mov edx, dword [edi]
lea ecx, [ebp - 0x20]
call fcn.00419c50
lea eax, [ebp - 0x24]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0
push 0x20006
push 0
push 0
push 0
push dword [ebp - 0x20]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x4146b6
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor bl, bl
jmp 0x414864
cmp byte [edi + 4], 0
mov bl, 1
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
je 0x414706
lea ecx, [ebp - 0x1c]
call fcn.00404480
mov eax, dword [ebp - 0x1c]
mov ecx, dword [eax - 0xc]
lea ecx, [ecx*2 + 2]
push ecx
push eax
push 1
push 0
push str.Created_by_KbdEdit
push dword [ebp - 0x14]
call esi
lea ecx, [ebp - 0x1c]
mov esi, eax
call fcn.004043f0
test esi, esi
sete bl
test esi, esi
jne 0x4147a5
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [edi + 8]
push 0x58ea4c
push eax
call fcn.00412190
add esp, 8
test al, al
je 0x414743
mov ecx, dword [edi + 8]
mov eax, dword [ecx - 0xc]
lea eax, [eax*2 + 2]
push eax
push ecx
push 1
push 0
push str.Layout_File
push dword [ebp - 0x14]
call esi
test eax, eax
je 0x414743
xor bl, bl
jmp 0x414854
lea eax, [edi + 0xc]
push 0x58ea4c
push eax
call fcn.00412190
add esp, 8
test al, al
je 0x414780
mov ecx, dword [edi + 0xc]
mov eax, dword [ecx - 0xc]
lea eax, [eax*2 + 2]
push eax
push ecx
push 1
push 0
push str.Layout_Text
push dword [ebp - 0x14]
call esi
test eax, eax
je 0x414780
xor bl, bl
jmp 0x414854
cmp dword [edi + 0x10], 0xffffffff
lea eax, [edi + 0x10]
je 0x4147a5
push 4
push eax
push 4
push 0
push str.charset
push dword [ebp - 0x14]
call esi
test eax, eax
je 0x4147a5
xor bl, bl
jmp 0x414854
test bl, bl
je 0x414854
mov eax, 0xffff
cmp word [edi + 0x14], ax
je 0x414815
lea ecx, [ebp - 0x1c]
call fcn.00404480
mov byte [ebp - 4], 1
movzx eax, word [edi + 0x14]
push eax
lea eax, [ebp - 0x1c]
push str._04hx
push eax
call fcn.00403530
mov eax, dword [ebp - 0x1c]
add esp, 0xc
mov ecx, dword [eax - 0xc]
lea ecx, [ecx*2 + 2]
push ecx
push eax
push 1
push 0
push str.Layout_Id
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0x1c]
mov esi, eax
call fcn.004043f0
xor edx, edx
movzx ecx, bl
test esi, esi
cmove edx, ecx
mov bl, dl
test bl, bl
je 0x414854
add edi, 0x18
push 0x58ea4c
push edi
call fcn.00412190
add esp, 8
test al, al
je 0x414854
mov ecx, dword [edi]
mov eax, dword [ecx - 0xc]
lea eax, [eax*2 + 2]
push eax
push ecx
push 1
push 0
push str.IME_File
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor ecx, ecx
movzx ebx, bl
test eax, eax
cmovne ebx, ecx
push dword [ebp - 0x14]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push dword [ebp - 0x18]
call esi
mov esi, dword [ebp - 0x20]
or eax, 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x41487f
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret