Function at 0x408c2c
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 0x408cd8
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x408c95
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x408ca4
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 0x408fae
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 0x408d71
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x408d35
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x408d44
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 0x408fae
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 0x408dfa
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x408dbe
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x408dcd
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 0x408fae
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 0x408e93
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x408e57
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x408e66
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 0x408fae
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 0x408f05
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x408ec9
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x408ed8
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 0x408fae
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 0x408f72
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
jg 0x408f39
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
jmp 0x408f48
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 0x408fae
mov eax, dword [ebp - 0x24]
test eax, eax
jne 0x408fa7
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 0x408fae
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x10], 0
je 0x408fc4
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 0x409018
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 0x409018
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