Function at 0x408574
Capabilities:
Create thread
Inject thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_SearchPathA]
call eax
sub esp, 0x18
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x408620
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x4085dd
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x4085ec
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0x14], eax
mov dword [esp], 2
mov eax, dword [sym.___acrt_iob_func]
call eax
mov edx, dword [ebp - 0x14]
mov dword [esp + 0xc], edx
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], str._s:_Hook_DLL_not_found:__x_n
mov dword [esp], eax
call dbg.fprintf
jmp 0x4088f6
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._strlen
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0x3000
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
call eax
sub esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4086b9
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x40867d
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x40868c
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0x14], eax
mov dword [esp], 2
mov eax, dword [sym.___acrt_iob_func]
call eax
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], edx
mov dword [esp + 4], str.VirtualAllocEx_failed:__x_n
mov dword [esp], eax
call dbg.fprintf
jmp 0x4088f6
mov eax, dword [ebp - 0x1c]
add eax, 1
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
call eax
sub esp, 0x14
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x408742
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x408706
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x408715
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0x14], eax
mov dword [esp], 2
mov eax, dword [sym.___acrt_iob_func]
call eax
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], edx
mov dword [esp + 4], str.WriteProcessMemory_failed:__x_n
mov dword [esp], eax
call dbg.fprintf
jmp 0x4088f6
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov eax, dword [ebp - 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
call eax
sub esp, 0x1c
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x4087db
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x40879f
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x4087ae
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0x14], eax
mov dword [esp], 2
mov eax, dword [sym.___acrt_iob_func]
call eax
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], edx
mov dword [esp + 4], str.CreateRemoteThread_failed:__x_n
mov dword [esp], eax
call dbg.fprintf
jmp 0x4088f6
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call eax
sub esp, 8
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40884d
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x408811
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x408820
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0x14], eax
mov dword [esp], 2
mov eax, dword [sym.___acrt_iob_func]
call eax
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], edx
mov dword [esp + 4], str.WaitForSingleObject_failed:__x_n
mov dword [esp], eax
call dbg.fprintf
jmp 0x4088f6
lea eax, [ebp - 0x24]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
call eax
sub esp, 8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4088ba
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x408881
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x408890
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
movzx eax, ax
or eax, 0x80070000
mov dword [ebp - 0x14], eax
mov dword [esp], 2
mov eax, dword [sym.___acrt_iob_func]
call eax
mov edx, dword [ebp - 0x14]
mov dword [esp + 8], edx
mov dword [esp + 4], str.GetExitCodeThread_failed:__x_n
mov dword [esp], eax
call dbg.fprintf
jmp 0x4088f6
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x4088ef
mov dword [ebp - 0x14], 0x80004005
mov dword [esp], 2
mov eax, dword [sym.___acrt_iob_func]
call eax
mov edx, dword [ebp + 0xc]
mov dword [esp + 8], edx
mov dword [esp + 4], str._s:_DLL_failed_to_load_inside_target_process_n
mov dword [esp], eax
call dbg.fprintf
jmp 0x4088f6
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x10], 0
je 0x40890c
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
cmp dword [ebp - 0xc], 0
je 0x408960
mov dword [esp + 0xc], 0x8000
mov dword [esp + 8], 0
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
call eax
sub esp, 0x10
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x408960
mov dword [esp], 2
mov eax, dword [sym.___acrt_iob_func]
call eax
mov dword [esp + 4], str.VirtualFreeEx_failed_n
mov dword [esp], eax
call dbg.fprintf
mov eax, dword [ebp - 0x14]
leave
ret