Function at 0x40968e
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetErrorMode]
push edi
xor ebx, ebx
push ebx
call esi
or eax, 0x8001
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push 0xfffffffffffffff4
mov byte [ebp - 1], bl
call esi
push 0xfffffffffffffff5
mov dword [0x4952ac], eax
call esi
push dword [ebp + 0x14]
mov dword [0x4952a8], eax
push dword [ebp + 8]
call fcn.0040d186
mov edi, dword [ebp + 0x10]
cmp edi, ebx
pop ecx
pop ecx
je 0x40990e
mov esi, 0x496bd8
lea ecx, [ebp - 0xc]
call fcn.0042c3f7
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.00415c8c
mov eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
call fcn.00426ff7
mov edi, dword [ebp - 8]
push 4
push edi
push 0x481530
call fcn.00427f14
add esp, 0x18
test al, al
je 0x409727
mov ax, word [edi + 8]
call fcn.00426fde
test al, al
jne 0x409748
push 5
push edi
push str._EXEC
call fcn.00427f14
add esp, 0xc
test al, al
je 0x4097b1
mov ax, word [edi + 0xa]
call fcn.00426fde
test al, al
je 0x4097b1
push 0x6592
mov ecx, esi
call fcn.0042c43e
mov eax, dword [0x496bd8]
push 0x6590
mov word [eax], bx
push dword [0x496bd8]
push 0x2713
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_LoadStringW]
push dword [0x496bd8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
inc eax
push eax
mov ecx, esi
call fcn.0042c43e
push edi
lea ecx, [ebp - 0x10]
call fcn.004361de
mov eax, dword [ebp - 0x10]
call fcn.00403fea
lea ecx, [ebp - 0x10]
call fcn.0042704a
mov ecx, esi
mov byte [0x49a003], bl
call fcn.0042704a
push 4
push dword [ebp - 8]
push str.MAIN
call fcn.00427f14
add esp, 0xc
test al, al
je 0x409824
mov ecx, dword [ebp - 8]
add ecx, 8
xor edx, edx
mov dx, word [ecx]
mov eax, edx
call fcn.00426fde
test al, al
jne 0x4097e3
cmp dx, 0x2a
jne 0x409824
mov ax, word [ecx]
call fcn.00426fde
mov byte [ebp + 0x13], al
lea eax, [ebp - 0x14]
push eax
mov byte [0x496b86], bl
mov dword [ebp - 0x14], ecx
call fcn.00426ff7
cmp byte [ebp + 0x13], bl
pop ecx
je 0x409913
push 3
push dword [ebp - 0x14]
push 0x48151c
call fcn.00427eca
add esp, 0xc
test al, al
je 0x409913
cmp byte [ebp - 1], 2
jge 0x409861
push 0x496b70
mov eax, 0x10000
push eax
push 0x496bf0
push 0x402df1
push eax
push ebx
mov byte [0x496bf0], 0x11
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
je 0x40985b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x409861
mov byte [0x496bf0], bl
mov al, byte [0x496ebc]
mov byte [0x496b84], al
mov eax, dword [ebp - 8]
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
push 0x402f22
push 0x1000000
mov dword [ebp - 0x1c], ebx
call dword [sym.imp.KERNEL32.dll_CreateFiber]
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_ConvertThreadToFiber]
push edi
mov dword [0x496b88], eax
call dword [sym.imp.KERNEL32.dll_SwitchToFiber]
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFiber]
push ebx
mov ecx, 0x496eb8
call fcn.0041c401
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x48151a
mov ecx, 0x496ef4
call fcn.0042c4b4
mov eax, dword [0x496be0]
cmp eax, ebx
mov dword [0x496eec], ebx
mov dword [0x496ef0], ebx
mov byte [0x49a003], bl
mov byte [0x496bf1], 0x20
je 0x409937
lea ecx, [ebp - 0xc]
mov byte [0x495280], 1
mov edi, eax
mov byte [ebp - 1], 2
call fcn.0042704a
push dword [ebp + 0x14]
push dword [ebp + 8]
call fcn.0040d186
cmp edi, ebx
pop ecx
pop ecx
jne 0x4096e2
or eax, 0xffffffff
jmp 0x40995c
mov eax, dword [ebp - 8]
add eax, 8
push eax
lea ecx, [ebp - 0x18]
call fcn.004361de
push dword [ebp - 0x18]
mov ecx, 0x496eb8
call fcn.00422fb0
lea ecx, [ebp - 0x18]
call fcn.0042704a
cmp byte [0x496d4a], bl
je 0x409944
call fcn.0040bbe6
call fcn.004274d6
mov esi, eax
push esi
call fcn.004270d9
pop ecx
lea ecx, [ebp - 0xc]
call fcn.0042704a
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x10