Function at 0x4012b0
Capabilities:
Access pe header
Create thread
Inject thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x294
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x274], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x270], edi
mov dword [ebp - 0x278], eax
test edi, edi
je 0x401702
lea eax, [ebp - 0x260]
mov dword [ebp - 0x260], 0
push eax
mov dword [ebp - 0x268], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x401702
lea eax, [ebp - 0x268]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_IsWow64Process]
test eax, eax
je 0x401702
mov eax, dword [ebp - 0x260]
cmp eax, dword [ebp - 0x268]
jne 0x401702
push 0xc5c
push 0
push 0x403048
call sub.ntdll.dll_memset
add esp, 0xc
test esi, esi
je 0x4016ec
cmp word [esi], 0
je 0x4016ec
push esi
lea eax, [ebp - 0x25c]
push 0x104
push eax
call dword [sym.imp.ntdll.dll_wcscpy_s]
add esp, 0xc
test eax, eax
jne 0x4016ec
lea eax, [ebp - 0x25c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea ecx, [ebp - 0x25c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4013a1
sub ecx, edx
mov eax, 0x3b
sar ecx, 1
lea edx, [ebp - 0x25a]
lea edx, [edx + ecx*2]
mov word [ebp + ecx*2 - 0x25c], ax
test edx, edx
je 0x401405
mov ecx, edx
lea eax, [ebp - 0x25c]
sub ecx, eax
mov eax, 0x10c
sar ecx, 1
push 0x4020d4
sub eax, ecx
push eax
push edx
call dword [sym.imp.ntdll.dll_wcscpy_s]
add esp, 0xc
push esi
push 0x403048
call sub.ntdll.dll_RtlInitUnicodeString
mov eax, 0x403050
lea esi, [ebp - 0x25c]
jmp 0x40140a
mov eax, 0x403048
push esi
push eax
call sub.ntdll.dll_RtlInitUnicodeString
movzx ecx, word [0x40304a]
movzx eax, word [0x403052]
add eax, ecx
cmp eax, 0x800
ja 0x4016ec
push ecx
push dword [0x40304c]
push 0x4034a4
call sub.ntdll.dll_memcpy
movzx esi, word [0x40304a]
add esp, 0xc
mov ecx, dword [0x403054]
add esi, 0x4034a4
mov dword [0x40304c], 0
test ecx, ecx
je 0x401485
movzx eax, word [0x403052]
push eax
push ecx
push esi
call sub.ntdll.dll_memcpy
sub esi, 0x403048
add esp, 0xc
sub esi, 0x45c
mov dword [0x403054], esi
test ebx, ebx
je 0x4014f2
cmp word [ebx], 0
je 0x4014f2
push ebx
lea eax, [ebp - 0x264]
push eax
call sub.ntdll.dll_RtlInitUnicodeString
lea eax, [ebp - 0x44]
mov dword [ebp - 0x26c], 0x400000
mov dword [ebp - 0x268], eax
lea eax, [ebp - 0x264]
push 0
push eax
lea eax, [ebp - 0x26c]
push eax
call sub.ntdll.dll_RtlUnicodeStringToAnsiString
test eax, eax
jns 0x4014de
pop edi
pop esi
mov eax, 0xc00000f1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401c26
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x44]
push eax
push 0x40
push 0x403058
call dword [sym.imp.ntdll.dll_strcpy_s]
add esp, 0xc
mov eax, dword [ebp + 0x1c]
cmp eax, 0x400
jbe 0x401512
pop edi
pop esi
mov eax, 0xc00000f3
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401c26
mov esp, ebp
pop ebp
ret
mov dword [0x4030a0], eax
test eax, eax
je 0x40152f
push eax
push dword [ebp - 0x274]
push 0x4030a4
call sub.ntdll.dll_memcpy
add esp, 0xc
mov eax, dword [ebp + 0x14]
xor ebx, ebx
push 0x400000
mov dword [0x40309c], eax
call sub.ntdll.dll_RtlImageNtHeader
push 4
push 0x3000
mov esi, dword [eax + 0x50]
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
test edi, edi
je 0x401679
push edi
push 0x400000
call fcn.00401000
mov dword [ebp - 0x260], eax
test eax, eax
je 0x401673
push ebx
push esi
push eax
push edi
push dword [ebp - 0x270]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x401673
push 0x400000
call sub.ntdll.dll_RtlImageNtHeader
mov esi, 0x400000
xorps xmm0, xmm0
mov eax, dword [eax + 0x50]
mov dword [ebp - 0x27c], ebx
movups xmmword [ebp - 0x294], xmm0
lea ebx, [eax + 0x400000]
movq qword [ebp - 0x284], xmm0
cmp ebx, esi
jbe 0x4015f1
push 0
push 0x1c
lea eax, [ebp - 0x294]
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.ntdll.dll_NtQueryVirtualMemory
test eax, eax
js 0x401663
add esi, dword [ebp - 0x288]
cmp esi, ebx
jb 0x4015c5
push 0
mov ecx, edi
sub ecx, 0x400000
push 0
lea eax, [ecx + 0x403048]
add ecx, 0x401720
push eax
push ecx
push 0
push 0
push dword [ebp - 0x270]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov esi, eax
test esi, esi
je 0x401673
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x268]
mov dword [ebp - 0x268], 0
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x278]
test ecx, ecx
je 0x40165b
mov eax, dword [ebp - 0x268]
mov dword [ecx], eax
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0x260]
mov esi, eax
jmp 0x401685
mov ebx, dword [ebp - 0x260]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test ebx, ebx
je 0x4016b4
push 0x8000
lea eax, [ebp - 0x278]
mov dword [ebp - 0x274], ebx
push eax
lea eax, [ebp - 0x274]
mov dword [ebp - 0x278], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.ntdll.dll_NtFreeVirtualMemory
test edi, edi
je 0x4016cc
push 0x8000
push 0
push edi
push dword [ebp - 0x270]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
test esi, esi
jle 0x4016d9
movzx esi, si
or esi, 0xc0070000
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401c26
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xc00000f0
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00401c26
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 0xc00000ef
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401c26
mov esp, ebp
pop ebp
ret