Function at 0x401360
Capabilities:
Accept command line arguments
Access pe header
Create thread
Inject thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push esi
push edi
call fcn.004016c8
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], 0
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp dword [ebp - 0xc], 4
mov esi, eax
jne 0x401620
push dword [esi + 8]
mov edi, dword [sym.imp.ntdll.dll_wcscpy_s]
push 0x104
push 0x403008
call edi
add esp, 0xc
test eax, eax
jne 0x401620
push dword [esi + 0xc]
push 0x40
push 0x403210
call edi
add esp, 0xc
test eax, eax
jne 0x401620
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
push 0x4020a8
push dword [esi + 4]
call sub.ntdll.dll_swscanf_s
add esp, 0xc
cmp eax, 1
jne 0x401620
mov eax, dword [esi + 4]
cmp word [eax], 0x30
jne 0x401406
movzx eax, word [eax + 2]
cmp eax, 0x78
je 0x4013ff
cmp eax, 0x58
jne 0x401406
mov eax, dword [ebp - 4]
mov edi, eax
jmp 0x40142a
mov eax, dword [ebp - 4]
cmp eax, 0xffffffff
jne 0x401417
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 4], eax
push eax
push 0
push 0x43a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
mov eax, dword [ebp - 4]
test edi, edi
jne 0x401444
test eax, eax
je 0x401620
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 0
push eax
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov esi, dword [sym.imp.KERNEL32.dll_IsWow64Process]
push eax
call esi
test eax, eax
je 0x401619
lea eax, [ebp - 0x10]
push eax
push edi
call esi
test eax, eax
je 0x401619
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0x10]
jne 0x401619
push ebx
push 0x400000
mov dword [ebp - 8], 0
call sub.ntdll.dll_RtlImageNtHeader
push 4
push 0x3000
mov esi, dword [eax + 0x50]
push esi
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
test ebx, ebx
je 0x4015c2
push ebx
push 0x400000
call fcn.00401000
mov dword [ebp - 8], eax
test eax, eax
je 0x4015c2
push 0
push esi
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x4015c2
push 0x400000
call sub.ntdll.dll_RtlImageNtHeader
mov esi, 0x400000
xorps xmm0, xmm0
mov eax, dword [eax + 0x50]
movups xmmword [ebp - 0x34], xmm0
mov dword [ebp - 0x1c], 0
movq qword [ebp - 0x24], xmm0
lea eax, [eax + 0x400000]
mov dword [ebp - 0x14], eax
cmp eax, esi
jbe 0x40155f
push 0
push 0x1c
lea eax, [ebp - 0x34]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call main
test eax, eax
js 0x4015b5
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 0x30]
add eax, ebx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x20]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 0x10]
push eax
push edi
call sub.ntdll.dll_NtProtectVirtualMemory
test eax, eax
js 0x4015b5
add esi, dword [ebp - 0x28]
cmp esi, dword [ebp - 0x14]
jb 0x401514
push 0
mov ecx, ebx
sub ecx, 0x400000
push 0
lea eax, [ecx + 0x403008]
add ecx, 0x401230
push eax
push ecx
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov esi, eax
test esi, esi
je 0x4015c2
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 8]
jmp 0x4015d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, dword [ebp - 8]
test eax, eax
je 0x4015f4
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push 0x8000
push eax
lea eax, [ebp - 0x10]
mov dword [ebp - 0x14], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.ntdll.dll_NtFreeVirtualMemory
test ebx, ebx
je 0x401607
push 0x8000
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, 0x57
pop esi
mov esp, ebp
pop ebp
ret 4