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 [0x41b004]
xor eax, esp
mov dword [esp + 0x34], eax
push esi
xorps xmm0, xmm0
mov dword [esp + 8], 0
push edi
mov edi, dword [ebp + 0xc]
mov esi, str.reflective_dll.dll
mov dword [esp + 0x1c], 0
movaps xmmword [esp + 0x20], xmm0
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
cmp dword [ebp + 8], 2
mov dword [esp + 0x14], eax
jl 0x4010a1
mov esi, dword [edi + 4]
mov dword [esp + 0x18], esi
push 0
push 0x80
push 3
push 0
push 0
push 0x80000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
jne 0x4010d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_open_the_DLL_file
jmp 0x401297
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
je 0x40128b
test edi, edi
je 0x40128b
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 0x40128b
push 0
lea eax, [esp + 0x20]
push eax
push edi
push esi
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40115e
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.004014d0
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0xc]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x4011bd
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 0x4011b3
push 0
push 0
push 0
lea eax, [esp + 0x2c]
push eax
push 0
push dword [esp + 0x20]
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x14]
push 0
push 0x43a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [esp + 0x10], eax
test eax, eax
jne 0x401213
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.004014d0
mov esp, ebp
pop ebp
ret
push ecx
push edi
mov edx, esi
mov ecx, eax
call fcn.00401400
mov edi, eax
test edi, edi
jne 0x40123f
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 0x40125d
push dword [esp + 0x14]
push dword [esp + 0x1c]
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.004014d0
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.004014d0
mov esp, ebp
pop ebp
ret