Function at 0x403540
Capabilities:
Delete registry value
Persist via run registry key
Read .ini file
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4930e0
mov eax, dword fs:[0]
push eax
sub esp, 0x2e0
mov eax, dword [0x4c56f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::constructor_char_const___int_]
mov edi, ecx
push 0xffffffffffffffff
push str.fmol
lea ecx, [ebp - 0x2a0]
mov dword [ebp - 0x2e8], edi
call ebx
lea ecx, [edi + 0x230]
mov dword [ebp - 4], 0
call dword [sym.imp.DuiLib.dll_public:_char_const____thiscall_DuiLib::CDuiString::operator_char_const__void_const]
push eax
lea ecx, [ebp - 0x2a0]
call dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::Append_char_const__]
cmp byte [ebp + 0xc], 0
mov esi, dword [sym.imp.DuiLib.dll_public:_char_const____thiscall_DuiLib::CDuiString::GetData_void_const]
je 0x403772
lea edi, [ebp - 0x2e4]
call fcn.0042cad0
push 0xffffffffffffffff
mov ecx, eax
mov byte [ebp - 4], 1
call esi
push eax
lea ecx, [ebp - 0x25c]
call ebx
mov ecx, edi
mov byte [ebp - 4], 3
call dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_]
mov ebx, dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::Append_char_const__]
push str.SysConfig.ini
lea ecx, [ebp - 0x25c]
call ebx
push 0x103
lea eax, [ebp - 0x113]
push 0
push eax
mov byte [ebp - 0x114], 0
call fcn.00475cb0
add esp, 0xc
lea ecx, [ebp - 0x25c]
call esi
push eax
push 0
push 0x4a1d74
push str.SysConfig
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
lea ecx, [ebp - 0x25c]
mov edi, eax
call esi
push eax
push 0x104
lea ecx, [ebp - 0x114]
push ecx
push 0x4a1520
push str.RName
push str.SysConfig
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [ebp - 0x114]
lea ecx, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x403665
sub eax, ecx
je 0x40375c
test edi, edi
je 0x4036cd
xor eax, eax
lea ecx, [ebp - 0x114]
cmp byte [ebp - 0x114], al
je 0x403698
xor byte [ecx], al
inc eax
inc ecx
cmp eax, 5
jne 0x403693
xor eax, eax
cmp byte [ecx], 0
jne 0x403688
push 0xffffffffffffffff
lea edx, [ebp - 0x114]
push edx
lea ecx, [ebp - 0x2a0]
call dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::Assign_char_const___int_]
mov ecx, dword [ebp - 0x2e8]
add ecx, 0x230
call dword [sym.imp.DuiLib.dll_public:_char_const____thiscall_DuiLib::CDuiString::operator_char_const__void_const]
push eax
lea ecx, [ebp - 0x2a0]
call ebx
jmp 0x40375c
push 0xffffffffffffffff
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x2a0]
call dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::Assign_char_const___int_]
mov ecx, dword [ebp - 0x2e8]
add ecx, 0x230
call dword [sym.imp.DuiLib.dll_public:_char_const____thiscall_DuiLib::CDuiString::operator_char_const__void_const]
push eax
lea ecx, [ebp - 0x2a0]
call ebx
xor eax, eax
lea ecx, [ebp - 0x114]
cmp byte [ebp - 0x114], al
je 0x403720
lea ecx, [ecx]
xor byte [ecx], al
inc eax
inc ecx
cmp eax, 5
jne 0x40371b
xor eax, eax
cmp byte [ecx], 0
jne 0x403710
lea ecx, [ebp - 0x25c]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
push eax
push 0x4a1c68
push 0x4a1d74
push str.SysConfig
call edi
lea ecx, [ebp - 0x25c]
call esi
push eax
lea ecx, [ebp - 0x114]
push ecx
push str.RName
push str.SysConfig
call edi
lea ecx, [ebp - 0x25c]
mov byte [ebp - 4], 0
call dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_]
mov edi, dword [ebp - 0x2e8]
cmp byte [ebp + 8], 0
je 0x403924
lea edx, [ebp - 0x2e8]
push edx
push 0x20006
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4038e9
push 0x103
push eax
mov byte [ebp - 0x218], al
lea eax, [ebp - 0x217]
push eax
call fcn.00475cb0
mov ebx, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x218]
push ecx
push 0
call ebx
lea ecx, [ebp - 0x25c]
call dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::constructor_void_]
lea edx, [ebp - 0x218]
push edx
lea eax, [ebp - 0x25c]
push str.__s___mini
push eax
mov byte [ebp - 4], 4
call dword [sym.imp.DuiLib.dll_public:_int___cdecl_DuiLib::CDuiString::Format_char_const__]
add esp, 0xc
lea ecx, [ebp - 0x25c]
call dword [sym.imp.DuiLib.dll_public:_int___thiscall_DuiLib::CDuiString::GetLength_void_const]
push eax
lea ecx, [ebp - 0x25c]
call esi
push eax
push 1
push 0
lea ecx, [ebp - 0x2a0]
call esi
mov ecx, dword [ebp - 0x2e8]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edx, dword [ebp - 0x2e8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0x114]
push eax
push 0
call ebx
lea esi, [ebp - 0x114]
mov ecx, esi
push 0x5c
push ecx
call fcn.0046f030
add esp, 8
test eax, eax
je 0x40387d
push 0x5c
push esi
call fcn.0046f030
lea esi, [eax + 1]
push 0x5c
push esi
call fcn.0046f030
add esp, 0x10
test eax, eax
jne 0x403863
lea eax, [ebp - 0x114]
mov byte [esi], 0
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x403887
mov edx, dword [0x4a1b70]
mov ecx, dword [0x4a1b74]
mov dword [eax], edx
mov edx, dword [0x4a1b78]
mov dword [eax + 4], ecx
mov cx, word [0x4a1b7c]
mov dword [eax + 8], edx
mov dl, byte [0x4a1b7e]
mov word [eax + 0xc], cx
mov byte [eax + 0xe], dl
lea eax, [ebp - 0x114]
push eax
push 0x4a1738
push str.AutoStart
push str.SysConfig
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
lea ecx, [ebp - 0x25c]
mov byte [ebp - 4], 0
call dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_]
mov eax, dword [ebp + 0xc]
push eax
push edi
call fcn.004031d0
lea ecx, [ebp - 0x2a0]
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.DuiLib.dll_public:_void___thiscall_DuiLib::CDuiString::destructor_void_]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046eadd
mov esp, ebp
pop ebp
ret 8
lea ecx, [ebp - 0x2ec]
push ecx
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x4038f3
lea ecx, [ebp - 0x2a0]
call esi
mov edx, dword [ebp - 0x2ec]
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
jmp 0x4038f3