Function at 0x4029a0
Capabilities:
Accept command line arguments
Check if file exists
Create process on windows
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x410be0
mov eax, dword fs:[0]
push eax
sub esp, 0x1dc
mov eax, dword [0x419018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [str._display]
xor eax, eax
mov edi, dword [str.window]
mov dword [ebp - 0x98], eax
mov dword [ebp - 0x94], eax
mov eax, dword [0x416c2c]
mov dword [ebp - 0x9c], eax
xor eax, eax
mov dword [ebp - 0x10c], eax
mov dword [ebp - 0x108], eax
mov dword [ebp - 0x104], eax
mov ax, word [0x416c38]
mov dword [ebp - 0x90], 8
mov dword [ebp - 0x8c], 0xf
mov dword [ebp - 0x1d4], ebx
mov dword [ebp - 0xa0], ebx
mov byte [ebp - 0x98], 0
mov dword [ebp - 0x100], 6
mov dword [ebp - 0xfc], 0xf
mov dword [ebp - 0x110], edi
mov word [ebp - 0x10c], ax
mov byte [ebp - 0x10a], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edx, eax
xor eax, eax
mov ecx, edx
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
lea esi, [ecx + 1]
mov dword [ebp - 0x5c], eax
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402a80
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x70]
call fcn.00401280
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0xe0]
call fcn.004016f0
mov ecx, dword [ebp - 0x5c]
cmp ecx, 0x10
jb 0x402ad6
mov edx, dword [ebp - 0x70]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402acc
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
push ecx
lea eax, [ebp - 0xe0]
push eax
lea ecx, [ebp - 0x1e4]
call fcn.00404290
cmp byte [ebp - 0x1e0], 0
je 0x402afc
mov esi, 1
jmp 0x4033bc
xor eax, eax
push 0x20
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
call fcn.00404a3d
mov ecx, dword [str.Ion_Launcher_Mutex]
mov edx, eax
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
add esp, 4
mov dword [ebp - 0x58], edx
mov dword [ebp - 0x44], 0x1f
mov dword [ebp - 0x48], 0x12
mov dword [edx], ecx
mov ecx, dword [0x416c40]
mov dword [edx + 4], ecx
mov ecx, dword [0x416c44]
mov dword [edx + 8], ecx
mov eax, dword [0x416c48]
mov dword [edx + 0xc], eax
movzx eax, word [0x416c4c]
mov word [edx + 0x10], ax
lea eax, [ebp - 0x58]
mov byte [edx + 0x12], 0
cmp dword [ebp - 0x44], 0x10
cmovae eax, dword [ebp - 0x58]
push eax
push 0
push 0
push 0
call edi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x1c8], eax
call esi
mov eax, dword [0x416c54]
mov edx, 0xf
mov ecx, dword [str.Ion_Game_Mutex]
mov dword [ebp - 0x84], eax
mov eax, dword [0x416c58]
mov dword [ebp - 0x80], eax
movzx eax, word [0x416c5c]
mov word [ebp - 0x7c], ax
lea eax, [ebp - 0x88]
push eax
push 0
push 0
push 0
mov word [ebp - 0x7a], 0
mov dword [ebp - 0x78], 0xe
mov dword [ebp - 0x74], edx
mov dword [ebp - 0x88], ecx
call edi
mov dword [ebp - 0x1d0], eax
call esi
mov ecx, dword [ebp - 0xac]
mov eax, 0x2aaaaaab
mov edi, dword [ebp - 0xb0]
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp eax, 2
jbe 0x402c6c
cmp dword [edi + 0x44], 0x10
lea ecx, [edi + 0x30]
mov esi, dword [ecx + 0x10]
lea edx, [ebp - 0x110]
jb 0x402c0e
mov ecx, dword [ecx]
cmp esi, 6
jne 0x402c68
sub esi, 4
jb 0x402c29
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x402c2e
add ecx, 4
add edx, 4
sub esi, 4
jae 0x402c18
cmp esi, 0xfffffffc
je 0x402c62
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x402c5b
cmp esi, 0xfffffffd
je 0x402c62
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x402c5b
cmp esi, 0xfffffffe
je 0x402c62
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x402c5b
cmp esi, 0xffffffff
je 0x402c62
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x402c62
sbb eax, eax
or eax, 1
jmp 0x402c64
xor eax, eax
test eax, eax
je 0x402c6c
mov bl, 1
jmp 0x402c6e
xor bl, bl
lea eax, [edi + 0x30]
push eax
lea ecx, [ebp - 0x194]
call fcn.00403580
sub esp, 0x18
lea eax, [ebp - 0xe0]
mov ecx, esp
push eax
call fcn.00402100
lea ecx, [ebp - 0x1ac]
call fcn.00403c60
mov esi, dword [ebp - 0xb0]
lea eax, [ebp - 0x1ac]
add esp, 0x18
lea ecx, [ebp - 0x70]
add esi, 0x30
push eax
call fcn.00402100
push esi
lea ecx, [ebp - 0x170]
movzx edi, bl
call fcn.00402100
lea eax, [ebp - 0x70]
mov dword [ebp - 0x158], edi
push eax
lea ecx, [ebp - 0x154]
call fcn.00402100
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0x13c]
call fcn.00402100
push 0
mov dword [ebp - 0x124], 0
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push 0xc
mov dword [ebp - 0x120], eax
call fcn.00404a3d
add esp, 4
lea ecx, [ebp - 0x170]
mov dword [eax + 4], ecx
lea ecx, [ebp - 0x118]
push ecx
push 0
push eax
push 0x404230
push 0
push 0
mov dword [eax], edi
mov dword [eax + 8], 0x403fc0
call fcn.004086f5
add esp, 0x18
mov dword [ebp - 0x11c], eax
test eax, eax
je 0x4034d4
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x114], 0xffffffff
cmp ecx, 0x10
jb 0x402d82
mov edx, dword [ebp - 0x70]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402d78
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
push dword [ebp - 0x1c8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, dword [sym.imp.WINMM.dll_timeGetTime]
call edi
lea esi, [eax + 0x7530]
lea esp, [esp]
call edi
cmp eax, esi
jae 0x402daf
cmp dword [ebp - 0x114], 0xffffffff
je 0x402da0
push dword [ebp - 0x1d0]
mov esi, dword [sym.imp.KERNEL32.dll_ResetEvent]
call esi
movzx ebx, byte [ebp - 0x1c9]
xor ecx, ecx
push dword [ebp - 0x1c8]
test eax, eax
cmovne ebx, ecx
call esi
mov eax, dword [ebp - 0xb0]
lea ecx, [ebp - 0xe0]
add eax, 0x18
cmp ecx, eax
je 0x402dfe
cmp dword [eax + 0x14], 0x10
mov ecx, dword [eax + 0x10]
jb 0x402df1
mov eax, dword [eax]
push ecx
push eax
lea ecx, [ebp - 0xe0]
call fcn.00402200
mov edx, dword [ebp - 0xb8]
mov eax, 0x7fffffff
mov esi, dword [ebp - 0xd0]
sub eax, edx
cmp eax, esi
jb 0x4034e5
cmp dword [ebp - 0xb4], 0x10
lea ecx, [ebp - 0xc8]
push esi
cmovae ecx, dword [ebp - 0xc8]
lea eax, [ebp - 0xe0]
cmp dword [ebp - 0xcc], 0x10
cmovae eax, dword [ebp - 0xe0]
push eax
push edx
push ecx
push ecx
push dword [ebp - 0x1dc]
lea ecx, [ebp - 0xf8]
call fcn.00402640
mov esi, dword [ebp - 0xb0]
lea eax, [ebp - 0xf8]
cmp esi, eax
je 0x402ee4
cmp dword [esi + 0x14], 0x10
jb 0x402e9b
mov ecx, dword [esi + 0x14]
mov eax, dword [esi]
inc ecx
cmp ecx, 0x1000
jb 0x402e91
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
mov eax, edx
push ecx
push eax
call fcn.00404cc3
add esp, 8
mov eax, dword [ebp - 0xf8]
mov ecx, 0xf
mov dword [esi], eax
mov eax, dword [ebp - 0xf4]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0xf0]
mov dword [esi + 8], eax
mov eax, dword [ebp - 0xec]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0xe8]
mov dword [esi + 0x10], eax
mov eax, dword [ebp - 0xe4]
mov dword [esi + 0x14], eax
mov esi, dword [ebp - 0xb0]
mov byte [ebp - 0xf8], 0
jmp 0x402eea
mov ecx, dword [ebp - 0xe4]
cmp ecx, 0x10
jb 0x402f24
mov edx, dword [ebp - 0xf8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402f14
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
mov esi, dword [ebp - 0xb0]
add esp, 8
lea ecx, [esi + 0x18]
lea eax, [ebp - 0xa0]
cmp ecx, eax
je 0x402f53
cmp dword [ebp - 0x8c], 0x10
push 8
cmovae eax, dword [ebp - 0x1d4]
push eax
call fcn.00402200
mov edx, dword [ebp - 0xa0]
mov dword [ebp - 0x1d4], edx
sub esp, 8
lea eax, [ebp - 0x1c4]
lea ecx, [ebp - 0xe0]
push eax
call fcn.004019b0
mov edx, eax
cmp dword [edx + 0x14], 0x10
jb 0x402f72
mov edx, dword [edx]
xor eax, eax
mov ecx, edx
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
lea esi, [ecx + 1]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
jmp 0x402f90
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402f90
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x40]
call fcn.00401280
mov edx, dword [ebp - 0xb0]
cmp dword [edx + 0x14], 0x10
jb 0x402fb1
mov edx, dword [edx]
xor eax, eax
mov ecx, edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
lea esi, [ecx + 1]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x402fd0
sub ecx, esi
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00401280
cmp dword [ebp - 0x2c], 0x10
lea ecx, [ebp - 0x40]
push 1
cmovae ecx, dword [ebp - 0x40]
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 0x10
push 0
cmovae eax, dword [ebp - 0x28]
push ecx
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
mov ecx, dword [ebp - 0x14]
cmp ecx, 0x10
jb 0x40303d
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x403033
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034ea
push ecx
push edx
call fcn.00404cc3
add esp, 8
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
cmp ecx, 0x10
jb 0x403083
mov edx, dword [ebp - 0x40]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x403079
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034ea
push ecx
push edx
call fcn.00404cc3
add esp, 8
mov ecx, dword [ebp - 0x1b0]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0xf
mov byte [ebp - 0x40], 0
cmp ecx, 0x10
jb 0x4030cf
mov edx, dword [ebp - 0x1c4]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4030c5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034ea
push ecx
push edx
call fcn.00404cc3
add esp, 8
push dword [ebp - 0x1c8]
call dword [sym.imp.KERNEL32.dll_SetEvent]
call edi
lea esi, [eax + 0x7530]
test bl, bl
jne 0x403104
mov ebx, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea ecx, [ecx]
call edi
cmp eax, esi
jae 0x403104
push 0x64
push dword [ebp - 0x1d0]
call ebx
test eax, eax
jne 0x4030f0
mov ebx, dword [ebp - 0x1c8]
push ebx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
mov dword [ebp - 4], esi
push dword [ebp - 0x124]
call dword [sym.imp.USER32.dll_DestroyWindow]
push dword [ebp - 0x120]
call dword [sym.imp.GDI32.dll_DeleteObject]
lea ecx, [ebp - 0x11c]
call fcn.00403dc0
cmp dword [ebp - 0x118], esi
jne 0x4034ef
mov ecx, dword [ebp - 0x128]
cmp ecx, 0x10
jb 0x40318a
mov edx, dword [ebp - 0x13c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x403180
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
mov ecx, dword [ebp - 0x140]
mov dword [ebp - 0x12c], 0
mov dword [ebp - 0x128], 0xf
mov byte [ebp - 0x13c], 0
cmp ecx, 0x10
jb 0x4031df
mov edx, dword [ebp - 0x154]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4031d5
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
mov ecx, dword [ebp - 0x15c]
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x140], 0xf
mov byte [ebp - 0x154], 0
cmp ecx, 0x10
jb 0x403234
mov edx, dword [ebp - 0x170]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40322a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
mov ecx, dword [ebp - 0x198]
mov dword [ebp - 0x160], 0
mov dword [ebp - 0x15c], 0xf
mov byte [ebp - 0x170], 0
cmp ecx, 0x10
jb 0x403289
mov edx, dword [ebp - 0x1ac]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40327f
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
cmp dword [ebp - 0x180], 0x10
lea eax, [ebp - 0x194]
push 0
cmovae eax, dword [ebp - 0x194]
push 0x10000001
push 0
push dword [ebp - 0x17c]
push eax
call dword [sym.imp.USER32.dll_ChangeDisplaySettingsExA]
lea ecx, [ebp - 0x17c]
call fcn.004036c0
mov ecx, dword [ebp - 0x180]
cmp ecx, 0x10
jb 0x4032f8
mov edx, dword [ebp - 0x194]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4032ee
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
push dword [ebp - 0x1d0]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x184], 0
mov dword [ebp - 0x180], 0xf
mov byte [ebp - 0x194], 0
call edi
mov ecx, dword [ebp - 0x74]
cmp ecx, 0x10
jb 0x403358
mov edx, dword [ebp - 0x88]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40334e
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
push ebx
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0xf
mov byte [ebp - 0x88], 0
call edi
mov ecx, dword [ebp - 0x44]
cmp ecx, 0x10
jb 0x4033a4
mov edx, dword [ebp - 0x58]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40339a
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
mov ebx, dword [ebp - 0x1d4]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0xf
mov byte [ebp - 0x58], 0
mov eax, dword [ebp - 0x1e4]
test eax, eax
je 0x4033cd
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0xb0]
call fcn.00401c70
mov ecx, dword [ebp - 0xb4]
cmp ecx, 0x10
jb 0x403412
mov edx, dword [ebp - 0xc8]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x403408
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
mov ecx, dword [ebp - 0xcc]
mov dword [ebp - 0xb8], 0
mov dword [ebp - 0xb4], 0xf
mov byte [ebp - 0xc8], 0
cmp ecx, 0x10
jb 0x403467
mov edx, dword [ebp - 0xe0]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40345d
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push edx
call fcn.00404cc3
add esp, 8
mov edx, dword [ebp - 0x8c]
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xcc], 0xf
mov byte [ebp - 0xe0], 0
cmp edx, 0x10
jb 0x4034b4
lea ecx, [edx + 1]
mov eax, ebx
cmp ecx, 0x1000
jb 0x4034aa
mov ebx, dword [eax - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4034f4
push ecx
push ebx
call fcn.00404cc3
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404a2f
mov esp, ebp
pop ebp
ret 0x10
push 6
mov dword [ebp - 0x118], 0
call fcn.00404801
call fcn.004011f0
call fcn.00407c1f
call fcn.00408786
call fcn.00407c1f
int3