Function at 0x10016240
Capabilities:
Create thread
Get system information on windows
Inject thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003a874
mov eax, dword fs:[0]
push eax
sub esp, 0xd4
mov eax, dword [0x1004c100]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0xa8], 0
push eax
push 0
push 0x43a
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
mov dword [ebp - 0xbc], edi
mov byte [ebp - 4], 1
test edi, edi
je 0x10016974
cmp edi, 0xffffffff
je 0x10016974
xorps xmm0, xmm0
mov dword [ebp - 0xac], 0
lea eax, [ebp - 0xe0]
mov dword [ebp - 0xc0], 0
push eax
movups xmmword [ebp - 0xe0], xmm0
movups xmmword [ebp - 0xd0], xmm0
call dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
mov ax, word [ebp - 0xe0]
cmp ax, 9
je 0x100162f9
cmp ax, 6
je 0x100162f9
mov eax, dword [ebp - 0xac]
jmp 0x1001631d
lea eax, [ebp - 0xac]
push eax
push edi
call dword [0x1003c2f4]
test eax, eax
je 0x10016318
cmp dword [ebp - 0xac], 0
je 0x10016318
xor eax, eax
jmp 0x1001631d
mov eax, 1
test eax, eax
mov ecx, str.LunaHook64
mov edx, str.LunaHook32
setne byte [ebp - 0xa1]
test eax, eax
cmove ecx, edx
mov dword [ebp - 0xb8], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0xb4], ecx
test ecx, ecx
je 0x1001649d
mov eax, 0x7ffffffe
sub eax, ecx
cmp eax, 1
jb 0x100169e6
cmp dword [ebp + 0x20], 7
lea eax, [ebp + 0xc]
lea edx, [ecx + 1]
mov dword [ebp - 0x60], 0
cmova eax, dword [ebp + 0xc]
mov esi, 7
mov dword [ebp - 0xb0], eax
xorps xmm0, xmm0
mov dword [ebp - 0x5c], 0
lea eax, [ebp - 0x70]
mov dword [ebp - 0xac], edx
mov dword [ebp - 0xa8], eax
movups xmmword [ebp - 0x70], xmm0
cmp edx, esi
jbe 0x10016438
mov esi, edx
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x100163bc
mov eax, 0x7fffffff
mov esi, 0x7ffffffe
add eax, eax
jmp 0x100163dd
mov eax, 0xa
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
cmp eax, 0x7fffffff
ja 0x100169eb
add eax, eax
cmp eax, 0x1000
jb 0x10016412
lea ecx, [eax + 0x23]
cmp ecx, eax
jbe 0x100169eb
push ecx
call fcn.1001ebdf
mov ecx, eax
add esp, 4
test ecx, ecx
je 0x100169fa
mov edx, dword [ebp - 0xac]
lea eax, [ecx + 0x23]
and eax, 0xffffffe0
mov dword [eax - 4], ecx
mov ecx, dword [ebp - 0xb4]
jmp 0x1001642f
test eax, eax
je 0x1001642d
push eax
call fcn.1001ebdf
mov ecx, dword [ebp - 0xb4]
add esp, 4
mov edx, dword [ebp - 0xac]
jmp 0x1001642f
xor eax, eax
mov dword [ebp - 0xa8], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x5c], esi
lea esi, [ecx + ecx]
push esi
push dword [ebp - 0xb0]
mov dword [ebp - 0x60], edx
push eax
call fcn.10020fe0
mov eax, dword [ebp - 0xa8]
mov ecx, 0x5c
xor edx, edx
mov word [eax + esi], cx
mov ecx, dword [ebp - 0xac]
mov word [eax + ecx*2], dx
mov edx, dword [ebp - 0xb8]
lea eax, [ebp - 0x70]
push edx
push eax
lea eax, [ebp - 0xa0]
mov byte [ebp - 4], 2
push eax
mov dword [ebp - 0xa8], 0x201
call fcn.10010cc0
add esp, 0x18
mov ecx, eax
mov eax, 0x203
jmp 0x10016693
push 0x208
call fcn.1001ebdf
mov edi, eax
push 0x208
push 0
push edi
lea esi, [edi + 0x208]
mov dword [ebp - 0x7c], edi
mov dword [ebp - 0x74], esi
call fcn.10021560
add esp, 0x10
mov dword [ebp - 0x78], esi
push 0x104
push edi
push 0
mov dword [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x10016529
mov ecx, edi
mov dword [ebp - 0xc8], 0
xorps xmm0, xmm0
mov dword [ebp - 0xc4], 0
movups xmmword [ebp - 0xd8], xmm0
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10016504
sub ecx, edx
sar ecx, 1
push ecx
push edi
lea ecx, [ebp - 0xd8]
call fcn.10004640
mov byte [ebp - 0xc0], 1
jmp 0x10016530
mov byte [ebp - 0xc0], 0
test edi, edi
je 0x10016542
push 0x208
push edi
call fcn.1001ec0f
add esp, 8
cmp byte [ebp - 0xc0], 0
mov dword [ebp - 4], 5
mov dword [ebp - 0xa8], 0x404
je 0x100169f0
movups xmm0, xmmword [ebp - 0xd8]
xor eax, eax
mov word [ebp - 0xd8], ax
movups xmmword [ebp - 0x28], xmm0
movq xmm0, qword [ebp - 0xc8]
movq qword [ebp - 0x18], xmm0
mov dword [ebp - 0xc8], 0
mov dword [ebp - 0xc4], 7
mov edx, dword [ebp - 0xb8]
mov ecx, edx
mov dword [ebp - 4], 6
mov dword [ebp - 0xa8], 0x40c
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100165b1
sub ecx, esi
mov dword [ebp - 0x48], 0
sar ecx, 1
xorps xmm0, xmm0
push ecx
push edx
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x44], 0
movups xmmword [ebp - 0x58], xmm0
call fcn.10004640
mov dword [ebp - 0xa8], 0x4dc
cmp dword [ebp - 0x14], 7
lea edi, [ebp - 0x28]
mov eax, dword [ebp - 0x18]
cmova edi, dword [ebp - 0x28]
mov dword [ebp - 4], 8
lea esi, [edi + eax*2]
push esi
push edi
call fcn.100192e0
add esp, 8
cmp eax, esi
je 0x10016645
nop
movzx ecx, word [eax]
cmp ecx, 0x5c
je 0x1001661d
cmp ecx, 0x2f
jne 0x10016624
add eax, 2
cmp eax, esi
jne 0x10016610
cmp eax, esi
je 0x10016645
nop dword [eax + eax]
movzx ecx, word [esi - 2]
cmp ecx, 0x5c
je 0x10016645
cmp ecx, 0x2f
je 0x10016645
add esi, 0xfffffffe
cmp eax, esi
jne 0x10016630
sub esi, edi
sar esi, 1
cmp dword [ebp - 0x18], esi
jb 0x100169f5
cmp dword [ebp - 0x14], 7
lea eax, [ebp - 0x28]
mov dword [ebp - 0x18], esi
cmova eax, dword [ebp - 0x28]
xor ecx, ecx
mov byte [ebp - 4], 7
mov word [eax + esi*2], cx
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.10014390
push eax
lea ecx, [ebp - 0x88]
call fcn.100072a0
mov edi, dword [ebp - 0xbc]
lea ecx, [ebp - 0x88]
mov eax, 0x5fc
mov dword [ebp - 0x30], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x40], xmm0
mov dword [ebp - 0x2c], 0
xor edx, edx
movups xmm0, xmmword [ecx]
movups xmmword [ebp - 0x40], xmm0
movq xmm0, qword [ecx + 0x10]
movq qword [ebp - 0x30], xmm0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 7
mov word [ecx], dx
mov dword [ebp - 4], 9
test al, 0x20
je 0x100166f1
and eax, 0xffffffdf
lea ecx, [ebp - 0x88]
mov dword [ebp - 0xa8], eax
call fcn.10002f20
mov eax, dword [ebp - 0xa8]
mov byte [ebp - 4], 0xa
test al, 0x10
je 0x10016756
mov ecx, dword [ebp - 0x44]
and eax, 0xffffffef
mov dword [ebp - 0xa8], eax
cmp ecx, 7
jbe 0x10016742
mov edx, dword [ebp - 0x58]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10016732
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100169fa
push ecx
push edx
call fcn.1001ec0f
mov eax, dword [ebp - 0xa8]
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], cx
mov byte [ebp - 4], 0xb
test al, 8
je 0x100167bb
mov ecx, dword [ebp - 0x14]
and eax, 0xfffffff7
mov dword [ebp - 0xa8], eax
cmp ecx, 7
jbe 0x100167a7
mov edx, dword [ebp - 0x28]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10016797
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100169fa
push ecx
push edx
call fcn.1001ec0f
mov eax, dword [ebp - 0xa8]
add esp, 8
xor ecx, ecx
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], cx
test al, 4
je 0x100167d9
and eax, 0xfffffffb
lea ecx, [ebp - 0xd8]
mov dword [ebp - 0xa8], eax
call fcn.100075d0
mov eax, dword [ebp - 0xa8]
test al, 2
je 0x100167f7
and eax, 0xfffffffd
lea ecx, [ebp - 0xa0]
mov dword [ebp - 0xa8], eax
call fcn.10002f20
mov eax, dword [ebp - 0xa8]
mov byte [ebp - 4], 0xe
test al, 1
je 0x10016807
lea ecx, [ebp - 0x70]
call fcn.10002f20
sub esp, 0x18
lea eax, [ebp - 0x40]
mov ecx, esp
push eax
call fcn.100072a0
call fcn.10014570
add esp, 0x18
cmp byte [ebp - 0xa1], 0
jne 0x1001690d
mov eax, dword [ebp - 0x30]
push 4
push 0x3000
mov byte [ebp - 0xa1], 0
lea eax, [eax*2 + 2]
push eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
mov dword [ebp - 0xb0], esi
test esi, esi
je 0x10016920
mov ecx, dword [ebp - 0x30]
cmp dword [ebp - 0x2c], 7
push 0
lea edx, [ecx*2 + 2]
push edx
lea ecx, [ebp - 0x40]
cmova ecx, dword [ebp - 0x40]
push ecx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push 0
push esi
push dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov esi, eax
mov dword [ebp - 0xb8], esi
mov byte [ebp - 4], 0xf
test esi, esi
je 0x100168ba
cmp esi, 0xffffffff
je 0x100168ba
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov byte [ebp - 0xa1], 1
jmp 0x100168e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x100168e3
sub esp, 0x18
mov ecx, esp
push str.architecture_mismatch:_only_x64_can_inject_this_process
call fcn.10002d40
call fcn.10014570
add esp, 0x18
mov byte [ebp - 0xa1], 0
mov byte [ebp - 4], 0x10
test esi, esi
je 0x100168f7
cmp esi, 0xffffffff
je 0x100168f7
push esi
call dword [0x1003ee30]
push 0x8000
push 0
push dword [ebp - 0xb0]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
jmp 0x10016920
lea eax, [ebp - 0x40]
push eax
push edi
call fcn.10017fd0
add esp, 8
mov byte [ebp - 0xa1], al
mov ecx, dword [ebp - 0x2c]
mov byte [ebp - 4], 1
cmp ecx, 7
jbe 0x1001695e
mov edx, dword [ebp - 0x40]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x10016954
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100169ff
push ecx
push edx
call fcn.1001ec0f
add esp, 8
xor eax, eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], ax
jmp 0x1001697b
mov byte [ebp - 0xa1], 0
mov byte [ebp - 4], 0x11
test edi, edi
je 0x1001698f
cmp edi, 0xffffffff
je 0x1001698f
push edi
call dword [0x1003ee30]
mov ecx, dword [ebp + 0x20]
cmp ecx, 7
jbe 0x100169c5
mov edx, dword [ebp + 0xc]
lea ecx, [ecx*2 + 2]
mov eax, edx
cmp ecx, 0x1000
jb 0x100169bb
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x100169ff
push ecx
push edx
call fcn.1001ec0f
add esp, 8
mov al, byte [ebp - 0xa1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1001ec1d
mov esp, ebp
pop ebp
ret
call fcn.10003560
call fcn.10003540
call fcn.1000fcd0
call fcn.1000e920
call fcn.1002373f
call fcn.1002373f
int3