Function at 0x401000
Capabilities:
Check if file exists
Get file attributes
Inspect load icon resource
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4cc
mov eax, dword [0x405004]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x430], eax
xor eax, eax
push edi
mov word [ebp - 0x20c], ax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x428]
push eax
push str.SoftwareReburnReburn_3
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov edi, eax
test edi, edi
jne 0x4010a2
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x42c], 0x104
push eax
push edi
push edi
push str.xbepath
push dword [ebp - 0x428]
call esi
lea eax, [ebp - 0x42c]
mov dword [ebp - 0x42c], 0x104
push eax
lea eax, [ebp - 0x414]
push eax
push edi
push edi
push str.cxbxpath
push dword [ebp - 0x428]
call esi
jmp 0x4010c0
cmp edi, 2
jne 0x4010c0
lea eax, [ebp - 0x428]
push eax
push str.SoftwareReburnReburn_3
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov edi, eax
push 0x58
lea eax, [ebp - 0x4cc]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov ebx, dword [sym.imp.COMDLG32.dll_GetOpenFileNameW]
add esp, 0xc
cmp word [ebp - 0x20c], 0
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x4cc], 0x58
mov dword [ebp - 0x4ac], 0x104
je 0x40110b
lea eax, [ebp - 0x20c]
push eax
call esi
cmp eax, 0xffffffff
jne 0x401183
lea eax, [ebp - 0x20c]
mov dword [ebp - 0x4c0], 0x403208
mov dword [ebp - 0x4b0], eax
lea eax, [ebp - 0x4cc]
push eax
mov dword [ebp - 0x49c], str.Where_is_Burnout_3_located_
call ebx
test eax, eax
je 0x401313
test edi, edi
jne 0x401183
lea ecx, [ebp - 0x20c]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401150
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x20c]
push eax
push 1
push 0
push str.xbepath
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp word [ebp - 0x414], 0
je 0x4011a5
lea eax, [ebp - 0x414]
push eax
call esi
cmp eax, 0xffffffff
je 0x4011a5
test edi, edi
jne 0x401222
jmp 0x401216
lea eax, [ebp - 0x414]
mov dword [ebp - 0x4c0], 0x403274
mov dword [ebp - 0x4b0], eax
lea eax, [ebp - 0x4cc]
push eax
mov dword [ebp - 0x49c], str.Where_is_Cxbx_located_
call ebx
test eax, eax
je 0x401313
test edi, edi
jne 0x401222
lea ecx, [ebp - 0x414]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4011e3
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x414]
push eax
push 1
push 0
push str.cxbxpath
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 0x430]
xorps xmm0, xmm0
push 4
mov dword [ebp - 0x458], 0
movlpd qword [ebp - 0x450], xmm0
mov dword [ebp - 0x440], 0
mov dword [ebp - 0x438], 0
mov dword [ebp - 0x448], ebx
call dword [sym.imp.GDI32.dll_GetStockObject]
push 0x65
push ebx
mov dword [ebp - 0x43c], eax
mov dword [ebp - 0x434], str.mainWnd
mov dword [ebp - 0x454], 0x4013e0
call dword [sym.imp.USER32.dll_LoadIconW]
mov dword [ebp - 0x444], eax
lea eax, [ebp - 0x458]
push eax
call dword [sym.imp.USER32.dll_RegisterClassW]
movaps xmm0, xmmword [0x403350]
lea eax, [ebp - 0x424]
push 0
push 0xcf0000
push eax
movups xmmword [ebp - 0x424], xmm0
call dword [sym.imp.USER32.dll_AdjustWindowRect]
mov eax, dword [ebp - 0x418]
sub eax, dword [ebp - 0x420]
push 0
push ebx
push 0
push 0
push eax
mov eax, dword [ebp - 0x41c]
sub eax, dword [ebp - 0x424]
push eax
push 0x80000000
push 0x80000000
push 0xcf0000
push str.Reburn_3:_Takedown
push str.mainWnd
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
mov ebx, eax
mov dword [ebp - 0x430], ebx
test ebx, ebx
jne 0x401328
push eax
push eax
push str.Failed_to_create_window
push eax
call dword [sym.imp.USER32.dll_MessageBoxW]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040196f
mov esp, ebp
pop ebp
ret 0x10
push dword [ebp + 0x14]
push ebx
call dword [sym.imp.USER32.dll_ShowWindow]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push eax
push ebx
call fcn.004016c0
add esp, 0xc
test al, al
je 0x401313
mov esi, dword [sym.imp.USER32.dll_PeekMessageW]
mov edi, dword [sym.imp.USER32.dll_TranslateMessage]
mov ebx, dword [sym.imp.USER32.dll_DispatchMessageW]
nop
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x474]
push eax
call esi
test eax, eax
je 0x4013a5
cmp dword [ebp - 0x470], 0x12
je 0x4013ad
lea eax, [ebp - 0x474]
push eax
call edi
lea eax, [ebp - 0x474]
push eax
call ebx
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x474]
push eax
call esi
test eax, eax
jne 0x401375
call dword [sym.imp.USER32.dll_WaitMessage]
jmp 0x401360
call dword [sym.imp.USER32.dll_WaitMessage]
push dword [ebp - 0x430]
call dword [sym.imp.USER32.dll_DestroyWindow]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x46c]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.0040196f
mov esp, ebp
pop ebp
ret 0x10