Function at 0x401050
Capabilities:
Acquire debug privileges
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x38
mov eax, dword [0x41a004]
xor eax, esp
mov dword [esp + 0x34], eax
push esi
mov esi, dword [ebp + 8]
xorps xmm0, xmm0
mov dword [esp + 4], 0
mov eax, str.reflective_dll.dll
mov dword [esp + 0x14], 0
movaps xmmword [esp + 0x1c], xmm0
mov dword [esp + 0x10], eax
push edi
mov edi, dword [ebp + 0xc]
cmp esi, 1
je 0x4010a4
cmp esi, 4
je 0x4010a4
push dword [edi + 4]
call fcn.0040521d
add esp, 4
jmp 0x4010aa
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [esp + 0xc], eax
cmp esi, 3
jl 0x4010bc
mov eax, dword [edi + 8]
mov dword [esp + 0x14], eax
jmp 0x4010c1
mov eax, str.reflective_dll.dll
mov ecx, dword [edi + 0xc]
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push eax
mov dword [esp + 0x38], ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x4010fb
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_open_the_DLL_file
jmp 0x4012c2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
je 0x4012b6
test edi, edi
je 0x4012b6
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x4012b6
push 0
lea eax, [esp + 0x1c]
push eax
push edi
push esi
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401185
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_alloc_a_buffer_
push str._____s._Error_d
call fcn.00401010
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
add esp, 0xc
call eax
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00401502
mov esp, ebp
pop ebp
ret
lea eax, [esp + 8]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4011e4
lea eax, [esp + 0x24]
mov dword [esp + 0x20], 1
push eax
push str.SeDebugPrivilege
push 0
mov dword [esp + 0x38], 2
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x4011da
push 0
push 0
push 0
lea eax, [esp + 0x2c]
push eax
push 0
push dword [esp + 0x1c]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0xc]
push 0
push 0x43a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x40123a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_open_the_target_process
push str._____s._Error_d
call fcn.00401010
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
add esp, 0xc
call eax
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00401502
mov esp, ebp
pop ebp
ret
push dword [esp + 0x1c]
mov edx, esi
mov ecx, eax
push edi
call fcn.00401430
mov edi, eax
test edi, edi
jne 0x401269
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_inject_the_DLL
push str._____s._Error_d
call fcn.00401010
add esp, 0xc
jmp 0x401288
push dword [esp + 0xc]
mov eax, dword [esp + 0x18]
push eax
push str.___Injected_the__s_DLL_into_process__d.
call fcn.00401010
add esp, 0xc
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call eax
push esi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x34]
xor ecx, esp
call fcn.00401502
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_get_the_DLL_file_size
push str._____s._Error_d
call fcn.00401010
mov ecx, dword [esp + 0x48]
add esp, 0xc
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.00401502
mov esp, ebp
pop ebp
ret