Function at 0x40821a
Capabilities:
Allocate or change rwx memory
Check if file exists
Execute shellcode via indirect call
Get file attributes
Link many functions at runtime
Resume thread

Disassembly:
mov eax, 0x40ad4b
call fcn.00409d50
sub esp, 0x1d4
push ebx
push edi
lea ecx, [ebp - 0x98]
call fcn.00401f74
mov al, byte [ebp + 0xb]
xor ebx, ebx
push ebx
lea ecx, [ebp - 0x1c]
mov dword [ebp - 4], ebx
mov byte [ebp - 0x1c], al
call fcn.004010d6
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 1
mov byte [ebp - 0x50], al
call fcn.004010d6
push dword [ebp + 8]
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea ecx, [ebp - 0x50]
push dword [ebp + 8]
call fcn.00401112
mov al, byte [ebp + 0xb]
push ebx
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
mov byte [ebp - 0x2c], al
call fcn.004010d6
push dword [ebp + 0xc]
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea ecx, [ebp - 0x2c]
push dword [ebp + 0xc]
call fcn.00401112
mov eax, dword [ebp - 0x28]
mov byte [ebp - 4], 3
cmp eax, ebx
mov edi, 0x40c1bc
jne 0x4082ad
mov eax, edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
cmp eax, ebx
mov dword [ebp - 0x30], eax
je 0x40850b
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.InitLoader
push eax
call esi
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x4084d7
cmp dword [ebp - 0x4c], ebx
je 0x4082e1
mov edi, dword [ebp - 0x4c]
lea ecx, [ebp - 0x98]
call fcn.00402329
neg eax
sbb eax, eax
inc eax
push eax
push edi
call dword [ebp + 8]
push 0x44
lea eax, [ebp - 0xdc]
pop edi
push edi
push ebx
push eax
call sub.MSVCRT.dll_memset
push 0x10
lea eax, [ebp - 0x40]
push ebx
push eax
mov dword [ebp - 0xdc], edi
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x1e0]
push 0x410ae0
push eax
call sub.MSVCRT.dll_strcpy
add esp, 0x28
lea ecx, [ebp - 0x98]
call fcn.004075a9
mov eax, dword [eax + 4]
cmp eax, ebx
jne 0x408344
mov eax, 0x40c1bc
push eax
lea eax, [ebp - 0x1e0]
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x1e0]
push 0x410f98
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0x1e0]
push 0x410f94
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x18
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
cmp edi, ebx
mov dword [ebp + 0xc], edi
je 0x4084d0
push str.CreateProcessA
push edi
call esi
cmp eax, ebx
je 0x4084c9
lea ecx, [ebp - 0x40]
push ecx
lea ecx, [ebp - 0xdc]
push ecx
push ebx
push ebx
push 4
push ebx
push ebx
lea ecx, [ebp - 0x1e0]
push ebx
push ecx
push ebx
call eax
cmp eax, ebx
je 0x40847e
push 0x40
push 0x3000
push 0x104
push ebx
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x40845a
push str.WriteProcessMemory
push edi
call esi
cmp eax, ebx
je 0x408453
mov ecx, dword [ebp - 0x28]
cmp ecx, ebx
jne 0x4083f7
mov ecx, 0x40c1bc
mov edx, dword [ebp - 0x24]
push ebx
inc edx
push edx
push ecx
push dword [ebp + 8]
push dword [ebp - 0x40]
call eax
test eax, eax
je 0x40844c
push str.CreateRemoteThread
push edi
call esi
mov edi, eax
cmp edi, ebx
je 0x408445
push ebx
push ebx
push dword [ebp + 8]
push str.LoadLibraryA
push dword [ebp + 0xc]
call esi
push eax
push ebx
push ebx
push dword [ebp - 0x40]
call edi
cmp eax, ebx
je 0x40843e
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x408470
mov esi, str.Thread_can_not_be_created.
jmp 0x40845f
mov esi, str.Function_CreateRemoteThread_can_not_be_found.
jmp 0x40845f
mov esi, str.Memory_can_not_be_written.
jmp 0x40845f
mov esi, str.Memory_writing_functions_not_found.
jmp 0x40845f
mov esi, str.Memory_can_not_be_allocated.
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call fcn.00401112
push dword [ebp - 0x3c]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
jmp 0x408500
mov esi, str.Process_
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call fcn.00401112
lea eax, [ebp - 0x1e0]
push eax
call sub.MSVCRT.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x1e0]
push eax
lea ecx, [ebp - 0x1c]
call fcn.00401e53
mov esi, str._can_not_be_created.
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call fcn.00401e53
jmp 0x408500
mov esi, str.CreateProcess_function_was_not_found.
jmp 0x4084ef
mov esi, str.kernel32.dll_was_not_found.
jmp 0x4084ef
push dword [0x40c1b8]
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x1c]
push ebx
push eax
call fcn.00401008
mov esi, str._can_not_be_initialized.
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call fcn.00401112
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x408563
mov esi, str.File_
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call fcn.00401112
push dword [0x40c1b8]
lea eax, [ebp - 0x2c]
lea ecx, [ebp - 0x1c]
push ebx
push eax
call fcn.004097ce
cmp dword [ebp - 0x28], ebx
je 0x40853c
mov edi, dword [ebp - 0x28]
push edi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
mov esi, str._does_not_exist.
je 0x408552
mov esi, str._can_not_be_loaded.
push esi
call sub.MSVCRT.dll_strlen
pop ecx
push eax
push esi
lea ecx, [ebp - 0x1c]
call fcn.00401e53
cmp dword [ebp - 0x14], ebx
pop esi
je 0x40857c
push dword [0x40c1b8]
mov ecx, dword [ebp + 0x10]
lea eax, [ebp - 0x1c]
push ebx
push eax
call fcn.00401008
push 1
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.004010d6
push 1
lea ecx, [ebp - 0x50]
mov byte [ebp - 4], 1
call fcn.004010d6
push 1
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], bl
call fcn.004010d6
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x98]
call fcn.004022d1
mov ecx, dword [ebp - 0xc]
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret