Function at 0x100012a0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc44
push ebx
push esi
push edi
mov esi, edx
mov ebx, ecx
push 8
push esi
push 0x100010c8
mov dword [esp + 0x18], esi
call dword [sym.imp.ntdll.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x10001445
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push eax
push 8
push 0xffffffffffffffff
call dword [sym.imp.ntdll.dll_NtOpenProcessToken]
test eax, eax
js 0x10001445
lea eax, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push eax
mov eax, dword [sym.imp.ntdll.dll_RtlPcToFileHeader]
push eax
mov dword [esp + 0x28], 0
call eax
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10001333
lea ecx, [esp + 0x20]
mov dword [esp + 0x28], 0x1b001a
push ecx
push 0
lea ecx, [esp + 0x30]
mov dword [esp + 0x34], 0x100010ac
push ecx
push eax
call dword [sym.imp.ntdll.dll_LdrGetProcedureAddress]
mov eax, dword [esp + 0x20]
test eax, eax
je 0x10001445
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], 0
push ecx
push 0
push dword [esp + 0x2c]
mov dword [esp + 0x24], 0
call eax
test eax, eax
js 0x10001445
mov eax, dword [esp + 0x14]
mov ecx, 0xbd4
cmp ax, cx
jbe 0x10001382
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
jmp 0x10001445
movzx esi, ax
lea eax, [esp + 0x50]
push esi
push dword [esp + 0x1c]
push eax
call sub.ntdll.dll_memcpy
shr esi, 1
xor eax, eax
add esp, 0xc
mov word [esp + esi*2 + 0x50], ax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.ntdll.dll_RtlFreeUnicodeString]
mov edx, 0x100010dc
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x100013b2
lea edi, [esp + 0x50]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x100013c6
mov ecx, edx
lea eax, [esp + 0x50]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push eax
and ecx, 3
lea eax, [esp + 0x4c]
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.ntdll.dll_RtlInitUnicodeString]
push 0
lea eax, [esp + 0x4c]
mov dword [esp + 0x34], 0x18
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x34]
push 0
push eax
push 0x1f0003
lea eax, [esp + 0x20]
mov dword [esp + 0x44], 0
push eax
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x24], 0
call dword [sym.imp.ntdll.dll_NtCreateEvent]
mov esi, dword [esp + 0xc]
mov edi, 0x10002060
lea ebx, [ebx]
movzx eax, word [edi]
shr eax, 1
push eax
push dword [edi + 4]
push esi
call dword [sym.imp.ntdll.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x100014ca
mov eax, 0x5a4d
mov dword [edi + 0xc], ebx
cmp word [ebx], ax
jne 0x100014ca
mov eax, dword [ebx + 0x3c]
cmp dword [eax + ebx], 0x4550
jne 0x100014ca
mov ecx, dword [eax + ebx + 0x80]
test ecx, ecx
je 0x100014ca
mov eax, dword [eax + ebx + 0x84]
test eax, eax
je 0x100014ca
lea esi, [ecx + ebx]
add eax, esi
mov dword [esp + 0x10], eax
cmp esi, eax
jae 0x100014c6
cmp dword [esi + 0xc], 0
je 0x100014c6
mov eax, dword [esi]
mov ecx, ebx
mov edx, dword [esi + 0x10]
add eax, ebx
push eax
add edx, ebx
call fcn.10001180
add esi, 0x14
add esp, 4
cmp esi, dword [esp + 0x10]
jb 0x100014a3
mov esi, dword [esp + 0xc]
add edi, 0x10
cmp edi, 0x100020b0
jne 0x10001450
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret