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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
mov eax, dword [0x4ccbf8]
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 0x40e35a
mov edi, ebx
test ebx, ebx
je 0x40e2c4
push 0x5c
push edi
call fcn.0048ca3c
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x40e19c
cmp byte [edi], al
je 0x40e2c4
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e191
sub ecx, edx
jmp 0x40e1a0
mov ecx, esi
sub ecx, edi
push ecx
lea eax, [ebp - 0x130]
push edi
push eax
call fcn.0041d160
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 0x40e210
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 0x40e174
jmp 0x40e2ca
test esi, esi
je 0x40e218
sub esi, ebx
jmp 0x40e226
mov esi, ebx
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x40e21d
sub esi, ecx
push esi
lea eax, [ebp - 0x130]
push ebx
push eax
call fcn.0041d160
add esp, 0xc
call fcn.00435f20
test eax, eax
je 0x40e2ae
call fcn.00435f20
cmp dword [eax], edi
je 0x40e2ae
mov eax, dword [0x4edee0]
test eax, eax
je 0x40e25a
mov esi, dword [eax + 0x190]
jmp 0x40e260
mov esi, dword [0x4edee4]
call fcn.00435f20
test eax, eax
je 0x40e270
call fcn.00435f20
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.00420470
pop ecx
pop ecx
push eax
lea eax, [ebp - 0x130]
push eax
push ebx
push dword [0x4edee0]
push esi
push 0
push 0x123c
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 0x40e2cc
mov ecx, dword [ebp - 0x138]
xor edi, edi
test ecx, ecx
je 0x40e3c8
mov eax, dword [ebp + 8]
sub eax, edi
je 0x40e33a
sub eax, 1
je 0x40e31d
dec eax
sub eax, 1
je 0x40e2fa
sub eax, 1
jne 0x40e351
mov edi, dword [ebp - 0x144]
push 4
push edi
push 4
push 0
jmp 0x40e33e
cmp dword [ebp + 0x10], 0
jne 0x40e30f
push dword [ebp - 0x140]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
jmp 0x40e34b
push dword [ebp + 0x10]
mov edi, dword [ebp - 0x144]
push edi
push 3
jmp 0x40e2f6
mov edi, dword [ebp - 0x144]
mov edx, edi
lea esi, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x40e328
sub edx, esi
lea eax, [edx + 1]
push eax
push edi
push 1
jmp 0x40e2f6
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 0x40e3c8
call fcn.00435f20
test eax, eax
je 0x40e3c8
call fcn.00435f20
cmp dword [eax], edi
je 0x40e3c8
mov eax, dword [0x4edee0]
test eax, eax
je 0x40e37d
mov esi, dword [eax + 0x190]
jmp 0x40e383
mov esi, dword [0x4edee4]
call fcn.00435f20
test eax, eax
je 0x40e393
call fcn.00435f20
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.00420470
pop ecx
pop ecx
push eax
push ebx
push dword [0x4edee0]
push esi
push 0
push 0x125d
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.0047f41c
leave
ret