Function at 0x40b510
Capabilities:
Accept command line arguments
Check mutex on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push dword [ebp + 8]
call fcn.004017e0
add esp, 4
mov dword [ebp + 8], 0
lea eax, [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov ecx, dword [ebp + 8]
mov esi, eax
shl ecx, 2
push ecx
mov dword [ebp - 0x14], esi
call fcn.0040fece
add esp, 4
mov dword [ebp - 8], 0
cmp dword [ebp + 8], 0
mov ebx, eax
mov dword [ebp - 4], ebx
jle 0x40b5e1
sub esi, eax
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], esi
nop word [eax + eax]
push 0x14
call fcn.0040ca8a
mov esi, dword [esi + ebx]
mov edx, eax
add esp, 4
mov dword [edx], vtable.KString.0
test esi, esi
je 0x40b5ad
mov ecx, esi
lea edi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40b590
sub ecx, edi
sar ecx, 1
mov dword [edx + 0x10], ecx
je 0x40b5ad
mov dword [edx + 0xc], esi
mov al, 1
xor cl, cl
jmp 0x40b5b1
xor al, al
mov cl, 1
mov ebx, edx
mov edi, edx
mov esi, edx
mov byte [ebx + 8], cl
mov ebx, dword [ebp - 0xc]
mov byte [edi + 9], al
mov edi, dword [ebp - 8]
mov dword [esi + 4], 0
inc edi
mov esi, dword [ebp - 0x10]
mov dword [ebx], edx
add ebx, 4
mov dword [ebp - 8], edi
mov dword [ebp - 0xc], ebx
cmp edi, dword [ebp + 8]
jl 0x40b570
mov ebx, dword [ebp - 4]
push 4
call fcn.0040ca8a
mov esi, eax
add esp, 4
mov ecx, esi
mov dword [esi], vtable.App.0
call fcn.00401210
mov edx, dword [esi]
mov ecx, esi
test al, al
je 0x40b60d
push dword [ebp + 8]
push ebx
call dword [edx]
mov dword [ebp - 8], eax
jmp 0x40b658
call dword [edx + 0xc]
push eax
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
test edi, edi
je 0x40b63f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x40b63f
mov ecx, dword [esi]
push dword [ebp + 8]
push ebx
mov edx, dword [ecx]
mov ecx, esi
call edx
mov dword [ebp - 8], eax
jmp 0x40b651
push dword [ebp + 8]
mov eax, dword [esi]
mov ecx, esi
push ebx
call dword [eax + 8]
mov dword [ebp - 8], eax
test edi, edi
je 0x40b658
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax + 0x10]
mov eax, dword [ebp + 8]
xor esi, esi
test eax, eax
jle 0x40b685
nop word [eax + eax]
mov ecx, dword [ebx + esi*4]
test ecx, ecx
je 0x40b680
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [ebp + 8]
inc esi
cmp esi, eax
jl 0x40b670
mov eax, dword [0x4235f0]
sub eax, 1
mov dword [0x4235f0], eax
jne 0x40b7c6
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push 0x4235f8
call ebx
movzx eax, word [0x4235f4]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalDeleteAtom]
push eax
call esi
movzx eax, word [0x4235e4]
push eax
call esi
mov esi, dword [0x4235e8]
test esi, esi
jne 0x40b6fa
push 0xc
call fcn.0040ca8a
add esp, 4
mov esi, eax
push 0x11
mov dword [esi], vtable.KFont.0
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esi + 4], eax
mov byte [esi + 8], 0
mov dword [0x4235e8], esi
test esi, esi
je 0x40b703
mov eax, dword [esi]
mov ecx, esi
push 1
call dword [eax + 4]
mov esi, dword [0x4235ec]
test esi, esi
jne 0x40b756
push 0x30
call fcn.0040ca8a
mov esi, eax
add esp, 4
mov dword [esi + 4], 0
lea ecx, [esi + 0x18]
mov dword [esi + 0xc], 0
mov dword [esi], 0
push ecx
mov dword [esi + 8], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x4235ec], esi
test esi, esi
je 0x40b7c3
mov edi, dword [esi + 0x10]
test edi, edi
je 0x40b784
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40b76d
push eax
call fcn.0040feb3
add esp, 4
cmp byte [edi + 0x28], 0
je 0x40b779
lea eax, [edi + 0x10]
push eax
call ebx
push 0x2c
push edi
call fcn.0040caba
add esp, 8
mov edi, dword [esi + 0x14]
test edi, edi
je 0x40b7b2
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40b79b
push eax
call fcn.0040feb3
add esp, 4
cmp byte [edi + 0x28], 0
je 0x40b7a7
lea eax, [edi + 0x10]
push eax
call ebx
push 0x2c
push edi
call fcn.0040caba
add esp, 8
lea eax, [esi + 0x18]
push eax
call ebx
push 0x30
push esi
call fcn.0040caba
add esp, 8
mov ebx, dword [ebp - 4]
push ebx
call fcn.0040feb3
add esp, 4
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [ebp - 8]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10