Function at 0x40bfe0
Capabilities:
Accept command line arguments
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4547b3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x8c
push ebx
push esi
mov ebx, ecx
push edi
mov dword [ebp - 0x10], ebx
call fcn.0040ef30
mov ecx, dword [ebx + 0xc]
sub ecx, 0x10
mov edi, eax
call fcn.00402bb0
add eax, 0x10
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x1c]
test edi, edi
je 0x40c035
push 0x11
push str.BFShellIcon64.dll
jmp 0x40c03c
push 0xf
push str.BFShellIcon.dll
call fcn.0040a080
mov esi, dword [ebp - 0x1c]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push esi
call fcn.0040a7b0
movzx eax, al
add esp, 4
test eax, eax
jne 0x40c061
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x14]
test edi, edi
je 0x40c088
push 0xf
push str.bfDesktop64.dll
jmp 0x40c08f
push 0xd
push str.bfDesktop.dll
call fcn.004017b0
push 0
push str.BFEngineLoader
call dword [sym.imp.USER32.dll_FindWindowW]
mov edi, dword [ebp - 0x14]
test eax, eax
je 0x40c1bd
sub esp, 0xc
mov ecx, edi
call fcn.0040a490
add esp, 0xc
test eax, eax
jns 0x40c1bd
cmp eax, 0x83000000
jne 0x40c1b3
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea ecx, [ebp - 0x98]
call section..text
mov byte [ebp - 4], 2
mov eax, dword [section..data]
mov ecx, section..data
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
push eax
push str._WithGUI
lea ecx, [ebp - 0x98]
mov byte [ebp - 4], 3
call fcn.004011b0
mov ebx, dword [ebp - 0x18]
test eax, eax
je 0x40c137
push 0x45de64
push ebx
call fcn.0043cb2c
add esp, 8
test eax, eax
je 0x40c137
push 0x45decc
lea ecx, [ebp - 0x18]
call fcn.00404500
test eax, eax
je 0x40c153
push 0x1030
push 0x45de6c
push 0x45de78
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
cmp eax, 1
jne 0x40c15b
mov ecx, dword [ebp - 0x10]
call fcn.0040d680
lea edx, [ebx - 0x10]
or ebx, 0xffffffff
mov byte [ebp - 4], 2
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c17b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x94]
test eax, eax
je 0x40c192
push eax
call fcn.0043ca9f
add esp, 4
mov edx, dword [ebp - 0x98]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c1bd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40c1bd
mov dword [ebx + 0x4e8], 3
lea edx, [edi - 0x10]
or edi, 0xffffffff
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40c1dd
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x40c1fb
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret