Function at 0x406b7a
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e0
mov ax, word [0x4124d8]
mov word [ebp - 0x10], ax
mov cl, byte [0x4124da]
mov byte [ebp - 0xe], cl
lea edx, [ebp - 0xc]
push edx
push 4
push 4
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
lea eax, [ebp - 4]
push eax
push 2
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
lea edx, [ebp - 4]
push edx
push 2
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0xc]
push edx
push 4
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edx, 1
test edx, edx
je 0x406d28
lea eax, [ebp - 0x2e0]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [ebp - 0x2e0], 0x103
je 0x406c58
mov dword [0x415484], 0xa
push str.Program_failed_to_start.
push 0x415488
call fcn.004098b7
add esp, 8
xor al, al
jmp 0x406d76
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x406ca3
mov dword [0x415484], 0xa
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Location_AAX__code__u__thread_handle_is__08X
push 0x415488
call fcn.004098b7
add esp, 0x10
xor al, al
jmp 0x406d76
push 0x2cc
push 0
lea ecx, [ebp - 0x2dc]
push ecx
call fcn.00409640
add esp, 0xc
mov dword [ebp - 0x2dc], 0x10001
lea edx, [ebp - 0x2dc]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x406d09
mov dword [0x415484], 0xa
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Location_AA__code__u__thread_handle_is__08X
push 0x415488
call fcn.004098b7
add esp, 0x10
xor al, al
jmp 0x406d76
mov ecx, dword [ebp - 0x224]
cmp ecx, dword [ebp + 0xc]
jne 0x406d16
jmp 0x406d28
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x406c09
lea ecx, [ebp - 0xc]
push ecx
push 4
push 4
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
lea edx, [ebp - 4]
push edx
push 2
lea eax, [ebp - 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0xc]
push edx
push 4
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov al, 1
mov esp, ebp
pop ebp
ret