Function at 0x4097da
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.0040d340
mov edi, dword [ebp + 0x10]
cmp edi, ebx
pop ecx
pop ecx
je 0x409a5a
mov esi, 0x496bd8
lea ecx, [ebp - 0xc]
call fcn.0042c809
lea eax, [ebp - 0xc]
push eax
push edi
call fcn.00415f34
mov eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
call fcn.00427312
mov edi, dword [ebp - 8]
push 4
push edi
push 0x481528
call fcn.00428263
add esp, 0x18
test al, al
je 0x409873
mov ax, word [edi + 8]
call fcn.00402a89
test al, al
jne 0x409894
push 5
push edi
push str._EXEC
call fcn.00428263
add esp, 0xc
test al, al
je 0x4098fd
mov ax, word [edi + 0xa]
call fcn.00402a89
test al, al
je 0x4098fd
push 0x6592
mov ecx, esi
call fcn.0042c850
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.0042c850
push edi
lea ecx, [ebp - 0x10]
call fcn.004365ba
mov eax, dword [ebp - 0x10]
call fcn.0040408f
lea ecx, [ebp - 0x10]
call fcn.00427365
mov ecx, esi
mov byte [0x49a003], bl
call fcn.00427365
push 4
push dword [ebp - 8]
push 0x481518
call fcn.00428263
add esp, 0xc
test al, al
je 0x409970
mov ecx, dword [ebp - 8]
add ecx, 8
xor edx, edx
mov dx, word [ecx]
mov eax, edx
call fcn.00402a89
test al, al
jne 0x40992f
cmp dx, 0x2a
jne 0x409970
mov ax, word [ecx]
call fcn.00402a89
mov byte [ebp + 0x13], al
lea eax, [ebp - 0x14]
push eax
mov byte [0x496b86], bl
mov dword [ebp - 0x14], ecx
call fcn.00427312
cmp byte [ebp + 0x13], bl
pop ecx
je 0x409a5f
push 3
push dword [ebp - 0x14]
push 0x481514
call fcn.00428219
add esp, 0xc
test al, al
je 0x409a5f
cmp byte [ebp - 1], 2
jge 0x4099ad
push 0x496b70
mov eax, 0x10000
push eax
push 0x496bf0
push 0x402e47
push eax
push ebx
mov byte [0x496bf0], 0x11
call dword [sym.imp.KERNEL32.dll_CreateThread]
cmp eax, ebx
je 0x4099a7
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4099ad
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 0x402f78
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.0041c72f
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0x481512
mov ecx, 0x496ef4
call fcn.0042c8c6
mov eax, dword [0x496be0]
cmp eax, ebx
mov dword [0x496eec], ebx
mov dword [0x496ef0], ebx
mov byte [0x49a003], bl
mov byte [0x496bf1], 0x20
je 0x409a83
lea ecx, [ebp - 0xc]
mov byte [0x495280], 1
mov edi, eax
mov byte [ebp - 1], 2
call fcn.00427365
push dword [ebp + 0x14]
push dword [ebp + 8]
call fcn.0040d340
cmp edi, ebx
pop ecx
pop ecx
jne 0x40982e
or eax, 0xffffffff
jmp 0x409aa8
mov eax, dword [ebp - 8]
add eax, 8
push eax
lea ecx, [ebp - 0x18]
call fcn.004365ba
push dword [ebp - 0x18]
mov ecx, 0x496eb8
call fcn.004232cf
lea ecx, [ebp - 0x18]
call fcn.00427365
cmp byte [0x496d4a], bl
je 0x409a90
call fcn.0040bda0
call fcn.00427825
mov esi, eax
push esi
call fcn.00427428
pop ecx
lea ecx, [ebp - 0xc]
call fcn.00427365
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 0x10