Function at 0x404e40
Capabilities:
Create thread
Inject dll
Inject thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x408e43
mov eax, dword fs:[0]
push eax
sub esp, 0x104
mov eax, dword [0x40d00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0xf0], ebx
cmp dword [ebx + 4], 0
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xec], esi
jne 0x404eb1
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x404e9e
xor al, al
jmp 0x4050cc
push str.LoadLibraryA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebx + 4], eax
test eax, eax
je 0x404e97
push 0xc0
lea eax, [ebp - 0xe8]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, edi
cmp dword [edi + 0x14], 0x10
jb 0x404ed1
mov eax, dword [edi]
sub esp, 0xc
lea ecx, [ebp - 0xe8]
push eax
call fcn.004069a0
mov eax, dword [ebp - 0xe8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe8], vtable.std::basic_fstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0xe8]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x78]
mov dword [ebp + ecx - 0xec], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xe8]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0xdc], 6
je 0x404f35
push str.invalid_file_n
call fcn.00407920
add esp, 4
xor bl, bl
jmp 0x405083
push edi
lea ecx, [ebp - 0x28]
call fcn.00404b90
mov edx, esi
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x110]
call fcn.00405870
lea ecx, [ebp - 0x28]
push ecx
mov ecx, eax
call fcn.00405b90
lea ecx, [ebp - 0x110]
mov esi, eax
call fcn.00401f20
test esi, esi
jne 0x404fb3
push dword [ebp - 0xec]
push esi
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
cmp esi, 0xffffffff
jne 0x404f87
push eax
jmp 0x404fad
mov eax, dword [edi + 0x10]
push 4
push 0x3000
inc eax
push eax
push 0
push esi
mov dword [ebp - 0xec], eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
test ebx, ebx
jne 0x404fed
test esi, esi
je 0x404fb3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor bl, bl
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x405071
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x405067
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x405067
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
cmp dword [edi + 0x14], 0x10
jb 0x404ff5
mov edi, dword [edi]
push 0
push dword [ebp - 0xec]
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x40501f
test esi, esi
je 0x404fb3
push 0x8000
push 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
jmp 0x404fac
mov eax, dword [ebp - 0xf0]
push 0
push 0
push ebx
push dword [eax + 4]
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
cmp eax, 0xffffffff
je 0x40500a
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test esi, esi
je 0x405060
push 0x8000
push 0
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
jmp 0x404fb5
push edx
push ecx
call fcn.00407a25
add esp, 8
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
mov eax, dword [ebp - 0xe8]
mov eax, dword [eax + 4]
mov dword [ebp + eax - 0xe8], vtable.std::basic_fstream_char__struct_std::char_traits_char__.0
mov ecx, dword [ebp - 0xe8]
mov edx, dword [ecx + 4]
lea ecx, [edx - 0x78]
mov dword [ebp + edx - 0xec], ecx
lea ecx, [ebp - 0xd0]
call fcn.00406850
lea ecx, [ebp - 0xc8]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_iostream_char__struct_std::char_traits_char__::destructor_void_]
lea ecx, [ebp - 0x70]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00407a14
mov esp, ebp
pop ebp
ret 8