Function at 0x401480
Capabilities:
Acquire debug privileges

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x58
mov eax, dword [0x405004]
xor eax, esp
mov dword [esp + 0x54], eax
push esi
mov esi, dword [ebp + 0xc]
push edi
push str.new_exe_______________________n
call fcn.00401010
add esp, 4
lea eax, [esp + 0x14]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x401532
lea eax, [esp + 0x18]
push eax
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
je 0x40150f
mov eax, dword [esp + 0x18]
push 0
push 0
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x24]
push 0x10
mov dword [esp + 0x34], eax
lea eax, [esp + 0x2c]
push eax
push 0
push dword [esp + 0x28]
mov dword [esp + 0x38], 1
mov dword [esp + 0x44], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x401528
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.EnableDebugPrivilege_failed
call fcn.00401010
add esp, 4
jmp 0x401532
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 8], 3
jl 0x401654
cmp dword [esi], 0
je 0x401654
mov eax, dword [esi + 4]
test eax, eax
je 0x401654
cmp dword [esi + 8], 0
je 0x401654
cmp dword [esi + 0xc], 0
je 0x401654
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atoi]
mov edi, eax
add esp, 4
test edi, edi
je 0x401583
cmp edi, 1
je 0x401583
push str.error___type_is_unidentified_n
jmp 0x401659
push dword [esi + 8]
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_atol]
mov edx, dword [esi + 0xc]
xorps xmm0, xmm0
mov ecx, edx
mov dword [esp + 0x18], eax
add esp, 4
movaps xmmword [esp + 0x30], xmm0
movaps xmmword [esp + 0x40], xmm0
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4015a8
sub ecx, esi
cmp ecx, 0x20
jbe 0x4015c0
push str.error___library_name_is_too_long_n
jmp 0x401659
push edx
lea eax, [esp + 0x34]
push 0x20
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strcpy_s]
add esp, 0xc
test edi, edi
jne 0x401602
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x30]
push esi
push eax
push str.info___inject_library___s__to_process___id:__ul___n
call fcn.00401010
add esp, 0xc
lea edx, [esp + 0x30]
mov ecx, esi
call fcn.00401040
test eax, eax
jne 0x401634
push str.error___function_InjectLibraryToProcess__returns_with_error_n
jmp 0x401659
cmp edi, 1
jne 0x401634
mov esi, dword [esp + 0x14]
lea eax, [esp + 0x30]
push esi
push eax
push str.info___eject_library___s__to_process___id:__ul___n
call fcn.00401010
add esp, 0xc
lea edx, [esp + 0x30]
mov ecx, esi
call fcn.00401220
test eax, eax
jne 0x401634
push str.error___function_EjectLibraryToProcess__returns_with_error_n
jmp 0x401659
push str.info___sucess_n
call fcn.00401010
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [esp + 0x54]
xor ecx, esp
call fcn.00401675
mov esp, ebp
pop ebp
ret
push str.info___usage:_LibraryInjection.exe__type___process_id___library_name___n
call fcn.00401010
mov ecx, dword [esp + 0x60]
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
xor ecx, esp
call fcn.00401675
mov esp, ebp
pop ebp
ret