Function at 0x405870
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d4
mov eax, dword [0x44d100]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0xc]
push edi
push ebx
call fcn.00406090
mov esi, eax
add esp, 8
test esi, esi
jns 0x4058c8
push esi
push str.failed_rebase_address_ret___d__n
push 2
call fcn.0042d610
add esp, 4
push eax
call fcn.00406a50
add esp, 0xc
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042c160
mov esp, ebp
pop ebp
ret
push 0
push 2
lea eax, [ebp - 0x2d4]
push eax
push dword [ebx + 0x44]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push 0
push 2
push 0x44186c
push dword [ebx + 0x44]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 2
push dword [ebx + 0x44]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x20
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov esi, dword [edi + 4]
lea eax, [ebp - 0x2cc]
push 0x2c8
push 0
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x2d0], 0x10001
lea eax, [ebp - 0x2d0]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x405a68
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x20
call dword [sym.imp.KERNEL32.dll_Sleep]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_SuspendThread]
mov eax, dword [ebp - 0x218]
cmp eax, dword [ebx + 0x44]
jne 0x405919
cmp dword [ebx + 0x48], 0
jne 0x4059a5
push str.ntleasig
push 0
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov esi, eax
test esi, esi
je 0x4059a5
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebx
call fcn.00405aa0
mov esi, eax
add esp, 8
test esi, esi
jns 0x4059c0
push esi
push str.failed_inject_DLL_ret___d__n
jmp 0x4058a2
push 0x7530
push dword [ebx + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 2
mov esi, eax
call fcn.0042d610
mov edx, str.success_wait_signal__n
test esi, esi
mov ecx, str.failed_wait_signal_timeout__n
cmove ecx, edx
push ecx
push eax
call fcn.00406a50
add esp, 0xc
cmp dword [ebx + 0x48], 0
jne 0x4059fb
call fcn.00406300
mov eax, dword [ebx + 0x3c]
test eax, eax
je 0x405a09
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebx + 0x38]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x405a19
push eax
call esi
mov eax, dword [ebx + 0x34]
test eax, eax
je 0x405a23
push eax
call esi
push 0
push 2
lea eax, [ebp - 0x2d4]
push eax
push dword [ebx + 0x44]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 2
push dword [ebx + 0x44]
push dword [edi]
call dword [sym.imp.KERNEL32.dll_FlushInstructionCache]
cmp dword [ebp + 0x10], 0
jne 0x405a55
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042c160
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 2
mov esi, eax
call fcn.0042d610
push esi
push str.Failed_GetThreadContext_:__u_n
push eax
call fcn.00406a50
mov ecx, dword [ebp - 4]
add esp, 0x10
xor ecx, ebp
mov eax, 0xffffd8e8
pop edi
pop esi
pop ebx
call fcn.0042c160
mov esp, ebp
pop ebp
ret