Function at 0x412e30
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4582e0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x47c9a0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
cmp byte [esi + 4], 0
jne 0x412e74
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
mov ecx, dword [esi]
call fcn.00412d20
test al, al
je 0x412e8a
mov ecx, dword [esi]
call fcn.00413510
test al, al
je 0x412e60
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 0
push eax
push 0x20006
push 0
push dword [0x4da7d8]
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x412e60
mov edx, dword [esi]
lea ecx, [ebp - 0x1c]
call fcn.00416db0
lea eax, [ebp - 0x20]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push 0
push 0x20006
push 0
push 0
push 0
push dword [ebp - 0x1c]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x412efe
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor bl, bl
jmp 0x41308a
cmp byte [esi + 4], 0
mov bl, 1
mov edi, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
je 0x412f4b
lea ecx, [ebp - 0x18]
call fcn.00404a50
mov eax, dword [ebp - 0x18]
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 - 0x10]
call edi
xor ecx, ecx
movzx ebx, bl
test eax, eax
cmovne ebx, ecx
lea ecx, [ebp - 0x18]
call fcn.004049c0
test bl, bl
je 0x41307a
lea ecx, [esi + 8]
mov edx, 0x4da5fc
call fcn.00410af0
test al, al
je 0x412f84
mov ecx, dword [esi + 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 - 0x10]
call edi
test eax, eax
je 0x412f84
xor bl, bl
jmp 0x41307a
lea ecx, [esi + 0xc]
mov edx, 0x4da5fc
call fcn.00410af0
test al, al
je 0x412fbd
mov ecx, dword [esi + 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 - 0x10]
call edi
test eax, eax
je 0x412fbd
xor bl, bl
jmp 0x41307a
cmp dword [esi + 0x10], 0xffffffff
lea eax, [esi + 0x10]
je 0x412fe2
push 4
push eax
push 4
push 0
push str.charset
push dword [ebp - 0x10]
call edi
test eax, eax
je 0x412fe2
xor bl, bl
jmp 0x41307a
mov eax, 0xffff
cmp word [esi + 0x14], ax
je 0x41303e
lea ecx, [ebp - 0x18]
call fcn.00404a50
mov byte [ebp - 4], 1
movzx eax, word [esi + 0x14]
push eax
lea eax, [ebp - 0x18]
push str._04hx
push eax
call fcn.00403ff0
mov eax, dword [ebp - 0x18]
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 - 0x10]
call edi
xor edx, edx
movzx ebx, bl
test eax, eax
lea ecx, [ebp - 0x18]
cmovne ebx, edx
call fcn.004049c0
test bl, bl
je 0x41307a
mov edx, 0x4da5fc
lea ecx, [esi + 0x18]
call fcn.00410af0
test al, al
je 0x41307a
mov ecx, dword [esi + 0x18]
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 - 0x10]
call edi
xor edx, edx
movzx ebx, bl
test eax, eax
cmovne ebx, edx
push dword [ebp - 0x10]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call esi
push dword [ebp - 0x14]
call esi
mov dword [ebp - 4], 0xffffffff
or ecx, 0xffffffff
mov esi, dword [ebp - 0x1c]
add esi, 0xfffffff0
lea eax, [esi + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4130ae
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