Function at 0x410820
Capabilities:
Accept command line arguments
Get common file path
Write file on windows

Disassembly:
mov eax, 0x9680
call fcn.004668d0
push str.PureBasic_Running
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
call fcn.00426ad0
push 0x104
lea eax, [esp + 0xc]
mov dword [0x4a9ec4], 0xffffffff
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov edx, 0x49a800
lea ecx, [esp + 8]
call fcn.00431750
mov ecx, 0x49a800
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x410877
sub ecx, edx
cmp byte [ecx + 0x49a800], 0x5c
lea eax, [ecx + 0x49a800]
je 0x410896
nop
dec eax
cmp byte [eax], 0x5c
jne 0x410890
dec eax
cmp byte [eax], 0x5c
je 0x4108a6
lea esp, [esp]
dec eax
cmp byte [eax], 0x5c
jne 0x4108a0
mov byte [eax + 1], 0
xor ecx, ecx
lea esp, [esp]
mov al, byte [ecx + 0x49a800]
lea ecx, [ecx + 1]
mov byte [ecx + 0x49ac1f], al
test al, al
jne 0x4108b0
mov ecx, 0x49ac20
dec ecx
lea esp, [esp]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x4108d0
mov eax, dword [str.Compilers_]
mov dword [ecx], eax
mov eax, dword [0x47029c]
mov dword [ecx + 4], eax
mov ax, word [0x4702a0]
mov word [ecx + 8], ax
mov al, byte [0x4702a2]
mov byte [ecx + 0xa], al
lea eax, [esp]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
test esi, esi
jne 0x41092d
push str.Cant_parse_commandline_arguments._Exiting_n
call fcn.0040abc0
add esp, 4
mov eax, 1
pop esi
add esp, 0x9680
ret
mov ecx, dword [esp + 4]
mov edx, esi
call fcn.00447a90
test eax, eax
je 0x410920
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [0x4a98f0], 0
je 0x41096c
call fcn.0040c4b0
push eax
push str.STARTING_t_s_tPureBasic_6.10_LTS___C_Backend__Windows___x86__n
call fcn.0040abc0
push 1
call fcn.0044ed5d
push eax
call fcn.0044f0f1
add esp, 0x10
push str.PureBasic_6.10_LTS___C_Backend__Windows___x86__Free_n
call fcn.00412ad0
push str.PATH
call fcn.004556a0
add esp, 8
test eax, eax
je 0x4109af
push eax
push 0x49ac20
lea eax, [esp + 0x21c]
push str.PATH_sgcc__s
push eax
call fcn.00401560
lea eax, [esp + 0x224]
push eax
call fcn.0044f4c5
add esp, 0x14
call fcn.0040d080
push 0x72
mov edx, 2
mov ecx, str.Residents_
call fcn.0040ce60
add esp, 4
cmp dword [0x4b03c0], 0
jne 0x4109e5
push 0
mov edx, 1
mov ecx, str.PureLibrariesWindows_
call fcn.0040ce60
add esp, 4
push edi
call fcn.0042ca30
cmp dword [0x4a98f0], 0
jne 0x410aca
mov eax, dword [0x4a5778]
test eax, eax
je 0x410aca
cmp dword [0x492188], 0
jne 0x410aca
cmp dword [0x4922a4], 0
jne 0x410aca
cmp dword [0x4922b0], 0
jne 0x410aca
cmp dword [0x4922b8], 0
jne 0x410aca
push eax
push str.Compiling__s_n
call fcn.00412ad0
add esp, 8
lea eax, [esp + 0x10]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edi, 0x4afd80
lea ecx, [esp + 0x10]
mov edx, edi
call fcn.00431750
call fcn.00447440
mov edx, 0x4922c0
sub edx, eax
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x410a73
cmp byte [0x4afd80], cl
je 0x410ab6
mov ecx, 0x4afd80
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x410a90
sub ecx, edx
cmp byte [ecx + 0x4afd7f], 0x5c
je 0x410ab6
dec edi
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x410aa3
mov ax, word [0x470354]
mov word [edi], ax
cmp byte [0x492184], 0
jne 0x410aca
mov ecx, dword [0x4a5778]
call fcn.00447970
push str.Loading_external_libraries..._n
call fcn.00412ad0
push 0x58
xor edx, edx
mov ecx, str.PureLibraries_
call fcn.0040ce60
push 0x58
xor edx, edx
mov ecx, str.PureLibrariesUserLibraries_
call fcn.0040ce60
add esp, 0xc
cmp dword [0x4afc48], 0
je 0x410b0f
call fcn.00412e30
pop edi
mov eax, 1
pop esi
add esp, 0x9680
ret
cmp dword [0x486ba8], 0
je 0x410b2b
call fcn.0040e560
neg eax
pop edi
sbb eax, eax
inc eax
pop esi
add esp, 0x9680
ret
cmp dword [0x492188], 0
push ebx
push ebp
je 0x410be7
mov ebp, dword [0x4a9ba8]
mov ecx, ebp
call fcn.00447220
mov edi, eax
test edi, edi
je 0x410ca4
mov ecx, dword [0x492108]
mov dword [ecx + 0x1000], 0
call fcn.00428870
test eax, eax
je 0x410bcc
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
test byte [eax + 0x1a], 4
jne 0x410bc3
mov ecx, dword [eax + 8]
mov edx, ecx
lea esi, [edx + 1]
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x410b80
sub edx, esi
lea esi, [esp + 0x220]
sub esi, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x410b92
push 0
lea eax, [esp + 0x18]
mov byte [esp + edx + 0x224], 0xa
push eax
lea eax, [edx + 1]
push eax
lea eax, [esp + 0x22c]
push eax
push edi
call ebx
mov ecx, dword [0x492108]
call fcn.00428870
test eax, eax
jne 0x410b70
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, str.File__s_successfully_created._n
push ebp
push eax
call fcn.00412ad0
add esp, 8
jmp 0x410cf3
cmp dword [0x4922b0], 0
je 0x410cb5
mov ebp, dword [0x4a9ba8]
mov ecx, ebp
call fcn.00447220
mov edi, eax
test edi, edi
je 0x410ca4
mov ecx, dword [0x492108]
mov dword [ecx + 0x1000], 0
call fcn.00428870
test eax, eax
je 0x410c8c
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea ebx, [ebx]
test byte [eax + 0x1a], 4
je 0x410c83
mov ecx, dword [eax + 8]
mov edx, ecx
lea esi, [edx + 1]
mov edi, edi
mov al, byte [edx]
inc edx
test al, al
jne 0x410c40
sub edx, esi
lea esi, [esp + 0x220]
sub esi, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x410c52
push 0
lea eax, [esp + 0x18]
mov byte [esp + edx + 0x224], 0xa
push eax
lea eax, [edx + 1]
push eax
lea eax, [esp + 0x22c]
push eax
push edi
call ebx
mov ecx, dword [0x492108]
call fcn.00428870
test eax, eax
jne 0x410c30
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, str.File__s_successfully_created._n
push ebp
push eax
call fcn.00412ad0
add esp, 8
jmp 0x410cf3
mov eax, str.Cant_create_file__s._n
push ebp
push eax
call fcn.00412ad0
add esp, 8
jmp 0x410cf3
cmp dword [0x4922a4], 0
je 0x410cc5
call fcn.0040cb20
jmp 0x410cf3
cmp dword [0x4922b8], 0
je 0x410cd5
call fcn.0040c7c0
jmp 0x410cf3
cmp dword [0x4a98f0], 0
jne 0x410d2e
cmp byte [0x492184], 0
je 0x410cee
call fcn.0040dba0
jmp 0x410cf3
call fcn.00410180
xor ebx, ebx
cmp dword [0x4afc48], ebx
setne bl
call fcn.00426600
mov eax, dword [0x49184c]
mov esi, dword [sym.imp.KERNEL32.dll_HeapDestroy]
test eax, eax
je 0x410d15
push eax
call esi
mov eax, dword [0x491954]
test eax, eax
je 0x410d21
push eax
call esi
pop ebp
mov eax, ebx
pop ebx
pop edi
pop esi
add esp, 0x9680
ret
call fcn.0040be80
int3