Function at 0x462bd0
Capabilities:
Check for foreground window switch
Create process on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x2c4
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2dc]
test esi, esi
push edi
mov byte [esp + 0x13], 0
mov byte [esp + 0x14], 0
mov bl, 1
je 0x462c54
cmp byte [esi], 0
je 0x462c54
inc esi
cmp byte [esi - 1], 0x2d
jne 0x462c49
push 8
push str.windowed
push esi
call fcn.0049b0e8
add esp, 0xc
test eax, eax
jne 0x462c18
mov byte [esp + 0x13], 1
jmp 0x462c49
push 0xa
push str.noresetdir
push esi
call fcn.0049b0e8
add esp, 0xc
test eax, eax
jne 0x462c30
xor bl, bl
jmp 0x462c49
push 7
push str.spewdir
push esi
call fcn.0049b0e8
add esp, 0xc
test eax, eax
jne 0x462c49
mov byte [esp + 0x14], 1
mov al, byte [esi]
inc esi
test al, al
jne 0x462bf7
test bl, bl
je 0x462c61
mov eax, dword [esp + 0x14]
push eax
call fcn.00462990
add esp, 4
call fcn.00462a70
call fcn.00460bf0
mov ecx, 0x462a10
mov eax, 0x462a60
push str.file.pck
mov dword [0x4b37c4], ecx
mov dword [0x4b37c8], eax
mov dword [0x4b399c], ecx
mov dword [0x4b39a0], eax
call fcn.00461700
mov eax, dword [0x4b3998]
lea edx, [esp + 0x1d4]
add esp, 4
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x462ca6
lea edi, [esp + 0x1d0]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x462cb8
mov ecx, dword [str.avoption.dat]
mov edx, dword [0x4a630c]
mov eax, dword [0x4a6310]
mov dword [edi], ecx
mov cl, byte [0x4a6314]
mov dword [edi + 4], edx
lea edx, [esp + 0x1d0]
mov dword [edi + 8], eax
push 0x4a2698
push edx
mov byte [edi + 0xc], cl
call fcn.00463fc2
add esp, 8
test eax, eax
jne 0x462ea5
push 1
push eax
push str.firstrun.cfg
call fcn.00461500
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x462e6d
mov ebp, dword [ebx]
lea eax, [ebp + 1]
push eax
call fcn.00459630
mov ecx, ebp
mov edx, ecx
shr ecx, 2
mov edi, eax
lea esi, [ebx + 4]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add esp, 4
mov ecx, ebx
mov dword [esp + 0x14], eax
mov byte [eax + ebp], 0
call fcn.004616f0
mov ebx, dword [esp + 0x14]
xor esi, esi
lea edx, [ebx + ebp + 1]
cmp ebx, edx
mov dword [esp + 0x50], 0x44
mov dword [esp + 0x54], esi
mov word [esp + 0x82], si
mov dword [esp + 0x84], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], esi
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], esi
mov dword [esp + 0x7c], esi
mov word [esp + 0x80], si
mov dword [esp + 0x88], esi
mov dword [esp + 0x8c], esi
mov dword [esp + 0x90], esi
mov dword [esp + 0x4c], edx
mov edi, ebx
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], esi
mov cl, 1
je 0x462e64
mov ebp, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov al, byte [edi]
cmp al, 0xa
je 0x462ded
cmp al, 0xd
je 0x462ded
test al, al
je 0x462ded
test cl, cl
je 0x462de9
mov dword [esp + 0x14], edi
xor cl, cl
jmp 0x462e5b
test cl, cl
jne 0x462e55
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x38]
push eax
mov byte [edi], cl
lea ecx, [esp + 0x54]
push ecx
push esi
push esi
push esi
push esi
push esi
push esi
push edx
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
cmp eax, 1
jne 0x462e55
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0xffffffffffffffff
lea eax, [esp + 0x3c]
push eax
call ebp
mov edx, dword [esp + 0x38]
lea ecx, [esp + 0x18]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [esp + 0x18], 0x103
je 0x462e14
mov eax, dword [esp + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x4c]
mov cl, 1
inc edi
cmp edi, edx
jne 0x462dd3
push ebx
call fcn.00459680
add esp, 4
lea edx, [esp + 0x1d0]
push 0x4a6318
push edx
call fcn.00463fc2
mov esi, eax
add esp, 8
test esi, esi
je 0x462eae
push esi
push 1
lea eax, [esp + 0x1d8]
push 1
push eax
call fcn.00463e3b
push esi
call fcn.00463f42
add esp, 0x14
jmp 0x462eae
push eax
call fcn.00463f42
add esp, 4
push 0
call fcn.00464e9e
push eax
call fcn.00463e0e
push 0x462480
call fcn.004623c0
add esp, 0xc
mov ecx, 0x4ceff0
call fcn.00460d10
mov esi, dword [esp + 0x2d8]
push 0x660600
push esi
call fcn.00462910
add esp, 8
test eax, eax
je 0x462f23
push 0
push esi
push 0
push 0
push 0x1e0
push 0x280
push SysReAllocString
push SysReAllocString
push 0xca0000
push str.Incrediball
push str.IncrediballWndClass
push 0
call dword [sym.imp.USER32.dll_CreateWindowExA]
mov esi, eax
test esi, esi
jne 0x462f32
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c4
ret 0x10
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
push 1
push 0
push 0
push esi
lea ecx, [esp + 0x2c]
push ecx
call edi
test eax, eax
je 0x462f78
lea ebx, [ebx]
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
push esi
lea ecx, [esp + 0x2c]
push ecx
call edi
test eax, eax
jne 0x462f50
mov ebx, dword [sym.imp.USER32.dll_GetForegroundWindow]
call ebx
cmp eax, esi
mov ebp, dword [sym.imp.USER32.dll_SwitchToThisWindow]
mov edi, dword [sym.imp.USER32.dll_SetForegroundWindow]
je 0x462fc0
mov edx, dword [0x4b3924]
cmp byte [edx], 0
je 0x462fc0
call ebx
mov ebx, eax
push 1
push ebx
call ebp
push ebx
call edi
mov ebx, dword [sym.imp.USER32.dll_ShowWindow]
push 6
push esi
call ebx
push 1
push esi
call ebx
push esi
call edi
mov ebx, dword [sym.imp.USER32.dll_GetForegroundWindow]
lea ecx, [esp + 0x94]
call fcn.00402190
xor eax, eax
lea ecx, [esp + 0x1c4]
mov dword [esp + 0x94], 0x4a05cc
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], 0x280
mov dword [esp + 0xbc], 0x1e0
mov byte [esp + 0xc0], al
call fcn.0045bfc0
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x2d8]
lea edx, [esp + 0x38]
mov byte [esp + 0x48], cl
push edx
lea ecx, [esp + 0x98]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 0x280
mov dword [esp + 0x48], 0x1e0
call fcn.00402550
lea eax, [esp + 0x94]
mov dword [0x4cf000], eax
mov byte [0x4ceffc], 1
call ebx
cmp eax, esi
je 0x463091
mov ecx, dword [0x4b3924]
cmp byte [ecx], 0
je 0x463091
call ebx
mov ebx, eax
push 1
push ebx
call ebp
push ebx
call edi
mov ebx, dword [sym.imp.USER32.dll_ShowWindow]
push 6
push esi
call ebx
push 1
push esi
call ebx
push esi
call edi
mov ebx, dword [sym.imp.USER32.dll_GetForegroundWindow]
mov al, byte [esp + 0x9c]
xor edx, edx
test al, al
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], edx
je 0x4631d2
mov ebp, dword [sym.imp.USER32.dll_IsWindow]
push esi
mov byte [0x4b39a4], dl
call ebp
test eax, eax
je 0x4631d2
jmp 0x4630e0
mov al, byte [esp + 0x9c]
test al, al
je 0x4631d2
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
push 1
push 0
push 0
push esi
lea eax, [esp + 0x2c]
push eax
call edi
test eax, eax
je 0x463138
jmp 0x463110
lea ecx, [esp + 0x1c]
push ecx
call dword [sym.imp.USER32.dll_TranslateMessage]
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push 0
push 0
push esi
lea eax, [esp + 0x2c]
push eax
call edi
test eax, eax
jne 0x463110
call ebx
cmp eax, esi
je 0x463188
mov ecx, dword [0x4b3118]
mov byte [0x4b39a5], 1
mov byte [0x4ceffd], 1
mov ecx, dword [ecx + 0xc]
test ecx, ecx
je 0x463160
push 1
call fcn.0042aed0
mov edx, dword [0x4b3118]
mov ecx, dword [edx + 0x60]
test ecx, ecx
je 0x46317e
call fcn.00456ab0
lea ecx, [esp + 0x94]
call fcn.00402880
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4631c7
mov al, byte [0x4b39a5]
test al, al
je 0x46319a
push 1
push esi
call dword [sym.imp.USER32.dll_ShowWindow]
lea ecx, [esp + 0x94]
mov byte [0x4b39a5], 0
call fcn.004027d0
mov eax, dword [0x4b3118]
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x4631c0
push 0
call fcn.0042aed0
mov byte [0x4ceffd], 0
push esi
call ebp
test eax, eax
jne 0x4630e0
lea ecx, [esp + 0x94]
call fcn.004027a0
lea ecx, [esp + 0x94]
call fcn.00402970
mov dword [0x4cf000], 0
call fcn.0044a940
call fcn.00461840
mov ecx, 0x4ceff0
call fcn.00460d50
push 0x462490
call fcn.004623c0
mov ecx, dword [esp + 0x2dc]
add esp, 4
push ecx
push str.IncrediballWndClass
call dword [sym.imp.USER32.dll_UnregisterClassA]
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c4
ret 0x10