Function at 0x40e745
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x4cdbf8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov dword [ebp - 0x144], eax
xor edi, edi
lea eax, [ebp - 0x134]
mov dword [ebp - 0x140], edx
push eax
lea eax, [ebp - 0x138]
mov ebx, ecx
push eax
push edi
push 4
push edi
push edi
push edi
push str.Software
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40e98a
mov edi, ebx
test ebx, ebx
je 0x40e8f4
push 0x5c
push edi
call fcn.0048d4ac
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x40e7cc
cmp byte [edi], al
je 0x40e8f4
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e7c1
sub ecx, edx
jmp 0x40e7d0
mov ecx, esi
sub ecx, edi
push ecx
lea eax, [ebp - 0x130]
push edi
push eax
call fcn.0041e7d0
add esp, 0xc
lea eax, [ebp - 0x134]
xor edi, edi
push eax
lea eax, [ebp - 0x13c]
push eax
push edi
push 0x20006
push edi
push edi
push edi
lea eax, [ebp - 0x130]
push eax
push dword [ebp - 0x138]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40e840
push dword [ebp - 0x138]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x13c]
lea eax, [esi + 1]
test esi, esi
mov dword [ebp - 0x138], ecx
mov edi, esi
cmovne edi, eax
test edi, edi
jne 0x40e7a4
jmp 0x40e8fa
test esi, esi
je 0x40e848
sub esi, ebx
jmp 0x40e856
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x40e84d
sub esi, ecx
push esi
lea eax, [ebp - 0x130]
push ebx
push eax
call fcn.0041e7d0
add esp, 0xc
call fcn.00436990
test eax, eax
je 0x40e8de
call fcn.00436990
cmp dword [eax], edi
je 0x40e8de
mov eax, dword [0x4eeee0]
test eax, eax
je 0x40e88a
mov esi, dword [eax + 0x190]
jmp 0x40e890
mov esi, dword [0x4eeee4]
call fcn.00436990
test eax, eax
je 0x40e8a0
call fcn.00436990
mov edi, dword [eax]
mov ebx, str.Error_creating_Key:_HKLMSoftware_s:__s
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00420fd0
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x130]
push eax
push ebx
push dword [0x4eeee0]
push esi
push 0
push 0x12b7
push str.D:MyProjectsProPilotTestMain.c
push 0x103
call edi
add esp, 0x28
xor edi, edi
push dword [ebp - 0x138]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, edi
mov dword [ebp - 0x138], ecx
jmp 0x40e8fc
mov ecx, dword [ebp - 0x138]
xor edi, edi
test ecx, ecx
je 0x40e9f8
mov eax, dword [ebp + 8]
sub eax, edi
je 0x40e96a
sub eax, 1
je 0x40e94d
dec eax
sub eax, 1
je 0x40e92a
sub eax, 1
jne 0x40e981
mov edi, dword [ebp - 0x144]
push 4
push edi
push 4
push 0
jmp 0x40e96e
cmp dword [ebp + 0x10], 0
jne 0x40e93f
push dword [ebp - 0x140]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
jmp 0x40e97b
push dword [ebp + 0x10]
mov edi, dword [ebp - 0x144]
push edi
push 3
jmp 0x40e926
mov edi, dword [ebp - 0x144]
mov edx, edi
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x40e958
sub edx, esi
lea eax, [edx + 1]
push eax
push edi
push 1
jmp 0x40e926
push edi
push edi
push edi
push edi
push dword [ebp - 0x140]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [ebp - 0x138]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40e9f8
call fcn.00436990
test eax, eax
je 0x40e9f8
call fcn.00436990
cmp dword [eax], edi
je 0x40e9f8
mov eax, dword [0x4eeee0]
test eax, eax
je 0x40e9ad
mov esi, dword [eax + 0x190]
jmp 0x40e9b3
mov esi, dword [0x4eeee4]
call fcn.00436990
test eax, eax
je 0x40e9c3
call fcn.00436990
mov edi, dword [eax]
mov ebx, str.Error_creating_Key:_HKLMSoftware:__s
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00420fd0
pop ecx
pop ecx
push eax
push ebx
push dword [0x4eeee0]
push esi
push 0
push 0x12d8
push str.D:MyProjectsProPilotTestMain.c
push 0x103
call edi
add esp, 0x24
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x134]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0047fe8c
leave
ret