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

Disassembly:
push ebp
lea ebp, [esp - 0x5464]
mov eax, 0x5464
call fcn.004f8350
push 0xffffffffffffffff
push 0x50fcf8
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x544354]
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.0047cd50
push 0x800
lea eax, [ebp + 0x4460]
push eax
call fcn.0047bc90
push 0x800
push str.Settings.reg
lea eax, [ebp + 0x4460]
push eax
call fcn.00494790
push 0x800
lea eax, [ebp + 0x4460]
push eax
lea eax, [ebp + 0x60]
push eax
call fcn.004947d0
test bh, bh
je 0x40b18d
push 1
push str.ExportedSettings
push 0x51787c
call fcn.004a6960
cmp byte [ebp + 0x5470], 0
jne 0x40b12b
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.0048e4c0
push eax
push dword [0x54b9c8]
call fcn.00407700
test al, al
je 0x40b186
test bh, bh
jne 0x40b276
lea ecx, [ebp]
call fcn.00494820
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.0046de50
test al, al
jne 0x40b1e0
lea eax, [ebp + 0x4460]
push eax
mov ecx, 0x57f41c
call fcn.004667d0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.00404180
xor al, al
jmp 0x40b46b
push 0
push 1
push 0x800
lea eax, [ebp + 0x4460]
push eax
push str.Settings.reg
call fcn.0047cb30
lea eax, [ebp + 0x4460]
push eax
call fcn.0046cad0
test al, al
jne 0x40b0f1
cmp byte [ebp + 0x5470], al
jne 0x40b186
push 0x800
lea eax, [ebp + 0x60]
push eax
lea eax, [ebp + 0x4460]
push eax
call fcn.004947d0
jmp 0x40b0fa
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp]
call fcn.00494960
test al, al
je 0x40b256
mov eax, dword [ebp - 0x14]
cmp word [eax], 0x5b
jne 0x40b1e0
push 0x22
push str._HKEY_CURRENT_USERSoftwareWinRAR
push eax
call fcn.00497de0
test eax, eax
mov eax, dword [ebp - 0x14]
jne 0x40b21f
movzx ecx, word [eax + 0x44]
cmp ecx, 0x5c
je 0x40b21b
cmp ecx, 0x5d
jne 0x40b21f
mov bl, 1
jmp 0x40b221
xor bl, bl
push 0x23
push str._HKEY_LOCAL_MACHINESoftwareWinRAR
push eax
call fcn.00497de0
test eax, eax
jne 0x40b247
mov eax, dword [ebp - 0x14]
movzx eax, word [eax + 0x46]
cmp eax, 0x5c
je 0x40b243
cmp eax, 0x5d
jne 0x40b247
mov al, 1
jmp 0x40b249
xor al, al
test bl, bl
jne 0x40b1e0
test al, al
jne 0x40b1e0
jmp 0x40b177
mov dword [ebp - 4], 0
push 0x51787c
call fcn.004a5510
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp]
call fcn.00404180
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.0047d340
lea eax, [ebp + 0x4460]
push eax
lea eax, [ebp + 0x2060]
test bh, bh
je 0x40b2ca
push str._e___s__HKEY_CURRENT_USERSoftwareWinRAR
jmp 0x40b2cf
push 0x51864c
push 0x900
push eax
call fcn.00402720
add esp, 0x10
push 0x3c
push 0
lea eax, [ebp - 0x50]
push eax
call fcn.004fa860
add esp, 0xc
mov dword [ebp - 0x50], 0x3c
mov dword [ebp - 0x4c], 0x40
mov eax, dword [0x54b9c8]
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
mov esi, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test bl, bl
je 0x40b34c
push 0x2710
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
jmp 0x40b352
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test bh, bh
je 0x40b3ea
test bl, bl
je 0x40b3db
push 0x800
lea eax, [ebp + 0x4460]
push eax
lea eax, [ebp + 0x3460]
push eax
call fcn.004947d0
push 0x800
lea eax, [ebp + 0x3460]
push eax
call fcn.0046d160
test eax, eax
je 0x40b3db
lea eax, [ebp + 0x3460]
push eax
push str._e___s__HKEY_LOCAL_MACHINESoftwareWinRAR
push 0x900
lea eax, [ebp + 0x2060]
push eax
call fcn.00402720
add esp, 0x10
lea eax, [ebp - 0x50]
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x40b3db
push 0x2710
push dword [ebp - 0x18]
call esi
push dword [ebp - 0x18]
call edi
lea eax, [ebp + 0x3460]
push eax
lea eax, [ebp + 0x4460]
push eax
call fcn.0040c450
push str.ExportedSettings
push 0x51787c
call fcn.004a5880
test bl, bl
je 0x40b446
test bh, bh
jne 0x40b3f7
call fcn.0040af90
lea eax, [ebp + 0x4460]
push eax
xor eax, eax
test bh, bh
sete al
add eax, 0x460
push eax
call fcn.0048e4c0
push eax
push 0x900
lea eax, [ebp + 0x3260]
push eax
call fcn.00402720
add esp, 0x10
push 0
push 0x2fb
call fcn.0048e4c0
push eax
lea eax, [ebp + 0x3260]
push eax
push dword [0x54b9c8]
call fcn.004cd560
jmp 0x40b469
cmp byte [ebp + 0x5470], 0
jne 0x40b469
lea eax, [ebp + 0x2060]
push eax
push 0x201
call fcn.0048e4c0
push eax
call fcn.004d1700
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.004f833c
lea esp, [ebp + 0x5464]
pop ebp
ret 8