Function at 0x40d540
Capabilities:
Create process on windows
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x5464]
mov eax, 0x5464
call fcn.00507730
push 0xffffffffffffffff
push 0x537508
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x5755c4]
xor eax, ebp
mov dword [ebp + 0x5460], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov bh, byte [ebp + 0x546c]
mov byte [ebp - 0x14], bh
push 1
push 0x800
lea eax, [ebp + 0x4460]
push eax
call fcn.004856f0
push 0x800
lea eax, [ebp + 0x4460]
push eax
call fcn.00484610
push 0x800
push str.Settings.reg
lea eax, [ebp + 0x4460]
push eax
call fcn.0049dbe0
push 0x800
lea eax, [ebp + 0x4460]
push eax
lea eax, [ebp + 0x60]
push eax
call fcn.0049dc20
test bh, bh
je 0x40d68d
push 1
push str.ExportedSettings
push 0x541b9c
call fcn.004afd40
cmp byte [ebp + 0x5470], 0
jne 0x40d62b
push dword [ebp - 0x14]
push str..reg
lea eax, [ebp + 0x4460]
push eax
xor eax, eax
test bh, bh
sete al
add eax, 0x5b4
push eax
call fcn.00497960
push eax
push dword [0x57cf9c]
call fcn.00409d70
test al, al
je 0x40d686
test bh, bh
jne 0x40d776
lea ecx, [ebp]
call fcn.0049dc70
mov dword [ebp - 4], 0
mov byte [ebp - 4], 1
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp]
push eax
lea eax, [ebp + 0x4460]
push eax
call fcn.00476450
test al, al
jne 0x40d6e0
lea eax, [ebp + 0x4460]
push eax
mov ecx, 0x5b77e4
call fcn.0046e680
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.00405100
xor al, al
jmp 0x40d96b
push 0
push 1
push 0x800
lea eax, [ebp + 0x4460]
push eax
push str.Settings.reg
call fcn.004854d0
lea eax, [ebp + 0x4460]
push eax
call fcn.004750c0
test al, al
jne 0x40d5f1
cmp byte [ebp + 0x5470], al
jne 0x40d686
push 0x800
lea eax, [ebp + 0x60]
push eax
lea eax, [ebp + 0x4460]
push eax
call fcn.0049dc20
jmp 0x40d5fa
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp]
call fcn.0049ddb0
test al, al
je 0x40d756
mov eax, dword [ebp - 0x14]
cmp word [eax], 0x5b
jne 0x40d6e0
push 0x22
push str._HKEY_CURRENT_USERSoftwareWinRAR
push eax
call fcn.004a1380
test eax, eax
mov eax, dword [ebp - 0x14]
jne 0x40d71f
movzx ecx, word [eax + 0x44]
cmp ecx, 0x5c
je 0x40d71b
cmp ecx, 0x5d
jne 0x40d71f
mov bl, 1
jmp 0x40d721
xor bl, bl
push 0x23
push str._HKEY_LOCAL_MACHINESoftwareWinRAR
push eax
call fcn.004a1380
test eax, eax
jne 0x40d747
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 0x46]
cmp eax, 0x5c
je 0x40d743
cmp eax, 0x5d
jne 0x40d747
mov al, 1
jmp 0x40d749
xor al, al
test bl, bl
jne 0x40d6e0
test al, al
jne 0x40d6e0
jmp 0x40d677
mov dword [ebp - 4], 0
push 0x541b9c
call fcn.004ae930
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.00405100
lea eax, [ebp + 0x1060]
push eax
push 1
push 0
push 0x24
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push 0x800
lea eax, [ebp + 0x1060]
push eax
push str.regedit.exe
push eax
call fcn.00485ce0
lea eax, [ebp + 0x4460]
push eax
lea eax, [ebp + 0x2060]
test bh, bh
je 0x40d7ca
push str._e___s__HKEY_CURRENT_USERSoftwareWinRAR
jmp 0x40d7cf
push 0x542a0c
push 0x900
push eax
call fcn.00402930
add esp, 0x10
push 0x3c
push 0
lea eax, [ebp - 0x50]
push eax
call fcn.00520500
add esp, 0xc
mov dword [ebp - 0x50], 0x3c
mov dword [ebp - 0x4c], 0x40
mov eax, dword [0x57cf9c]
mov dword [ebp - 0x48], eax
lea eax, [ebp + 0x1060]
mov dword [ebp - 0x40], eax
lea eax, [ebp + 0x2060]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x34], 1
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
setne bl
test bl, bl
je 0x40d846
push 0x2710
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test bh, bh
je 0x40d8ea
test bl, bl
je 0x40d8db
push 0x800
lea eax, [ebp + 0x4460]
push eax
lea eax, [ebp + 0x3460]
push eax
call fcn.0049dc20
push 0x800
lea eax, [ebp + 0x3460]
push eax
call fcn.00475740
test eax, eax
je 0x40d8db
lea eax, [ebp + 0x3460]
push eax
push str._e___s__HKEY_LOCAL_MACHINESoftwareWinRAR
push 0x900
lea eax, [ebp + 0x2060]
push eax
call fcn.00402930
add esp, 0x10
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x40d8db
push 0x2710
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp + 0x3460]
push eax
lea eax, [ebp + 0x4460]
push eax
call fcn.0040ead0
push str.ExportedSettings
push 0x541b9c
call fcn.004aec90
test bl, bl
je 0x40d946
test bh, bh
jne 0x40d8f7
call fcn.0040d490
lea eax, [ebp + 0x4460]
push eax
xor eax, eax
test bh, bh
sete al
add eax, 0x460
push eax
call fcn.00497960
push eax
push 0x900
lea eax, [ebp + 0x3260]
push eax
call fcn.00402930
add esp, 0x10
push 0
push 0x2fb
call fcn.00497960
push eax
lea eax, [ebp + 0x3260]
push eax
push dword [0x57cf9c]
call fcn.004d8380
jmp 0x40d969
cmp byte [ebp + 0x5470], 0
jne 0x40d969
lea eax, [ebp + 0x2060]
push eax
push 0x201
call fcn.00497960
push eax
call fcn.004dcc30
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x5460]
xor ecx, ebp
call fcn.00507712
lea esp, [ebp + 0x5464]
pop ebp
ret 8