Function at 0x10001200
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov dword [ebp - 4], ecx
push esi
cmp edx, 0x40
jb 0x10001486
mov eax, 0x5a4d
cmp word [ecx], ax
jne 0x10001486
mov esi, dword [ecx + 0x3c]
lea eax, [esi + 0xf8]
cmp edx, eax
jl 0x10001486
add esi, ecx
cmp dword [esi], 0x4550
jne 0x10001486
mov eax, 0x2000
test word [esi + 0x16], ax
jne 0x10001486
mov eax, 0xe0
cmp word [esi + 0x14], ax
jne 0x10001486
lea eax, [esi + 0xf8]
push eax
push esi
call fcn.10001160
mov ecx, dword [ebp + 0x14]
add esp, 8
mov dword [ecx], eax
test eax, eax
je 0x10001486
push edi
push 0x40
push 0x1000
push eax
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov ecx, dword [ebp + 0x10]
mov edi, eax
mov dword [ebp - 0xc], edi
mov dword [ecx], edi
test edi, edi
je 0x1000147b
movzx edx, word [esi + 6]
mov ecx, dword [esi + 0x54]
push ebx
xor ebx, ebx
test edx, edx
je 0x100013b2
cmp edx, 8
jb 0x100013b2
cmp dword [0x1009f238], 2
jl 0x100013b2
movups xmm6, xmmword [0x100251b0]
mov eax, edx
and eax, 0xfffffff8
movd xmm0, ecx
mov dword [ebp - 8], eax
lea eax, [esi + 0x15c]
mov ecx, dword [ebp - 8]
pshufd xmm4, xmm0, 0
movaps xmm5, xmm4
nop word [eax + eax]
movd xmm2, dword [eax + 0x28]
lea eax, [eax + 0x140]
movd xmm0, dword [eax - 0x140]
add ebx, 8
movd xmm1, dword [eax - 0x168]
movd xmm3, dword [eax - 0x190]
punpckldq xmm3, xmm0
movaps xmm0, xmm4
punpckldq xmm1, xmm2
movd xmm2, dword [eax - 0x78]
punpckldq xmm3, xmm1
xorps xmm1, xmm1
pcmpeqd xmm1, xmm3
andnps xmm1, xmm6
pminud xmm0, xmm3
movd xmm3, dword [eax - 0xf0]
andps xmm0, xmm1
andnps xmm1, xmm4
orps xmm0, xmm1
movd xmm1, dword [eax - 0xc8]
punpckldq xmm1, xmm2
movaps xmm4, xmm0
movd xmm0, dword [eax - 0xa0]
punpckldq xmm3, xmm0
movaps xmm0, xmm5
punpckldq xmm3, xmm1
xorps xmm1, xmm1
pcmpeqd xmm1, xmm3
andnps xmm1, xmm6
pminud xmm0, xmm3
andps xmm0, xmm1
andnps xmm1, xmm5
orps xmm0, xmm1
movaps xmm5, xmm0
cmp ebx, ecx
jl 0x100012f0
pminud xmm4, xmm5
movaps xmm0, xmm4
psrldq xmm0, 8
pminud xmm4, xmm0
movups xmm0, xmm4
psrldq xmm0, 4
pminud xmm4, xmm0
movd ecx, xmm4
cmp ebx, edx
jge 0x100013d7
lea eax, [ebx + ebx*4]
lea esi, [esi + eax*8]
add esi, 0x10c
sub edx, ebx
mov eax, dword [esi]
test eax, eax
je 0x100013cf
cmp eax, ecx
cmovb ecx, eax
add esi, 0x28
sub edx, 1
jne 0x100013c4
push ecx
push dword [ebp - 4]
push edi
call fcn.10008410
mov eax, dword [ebp + 8]
add esp, 0xc
mov esi, dword [edi + 0x3c]
add esi, edi
mov dword [ebp - 8], esi
mov dword [eax], esi
mov eax, dword [ebp + 0xc]
mov edx, dword [esi + 0x38]
lea ecx, [esi + 0xf8]
mov dword [eax], ecx
mov ecx, dword [esi + 0x54]
call fcn.10001140
xor ebx, ebx
mov dword [0x1009fd00], ebx
lea ecx, [edi + eax]
xor eax, eax
cmp ax, word [esi + 6]
jae 0x1000147a
add esi, 0x108
mov eax, dword [esi - 4]
add edi, eax
test eax, eax
mov eax, dword [esi]
cmove edi, ecx
test eax, eax
je 0x10001451
push eax
mov eax, dword [esi + 4]
add eax, dword [ebp - 4]
push eax
push edi
call fcn.10008410
mov ecx, dword [esi]
add esp, 0xc
mov eax, dword [ebp + 8]
cmp dword [esi - 8], ecx
cmovae ecx, dword [esi - 8]
mov eax, dword [eax]
jmp 0x10001457
mov ecx, dword [esi - 8]
mov eax, dword [ebp - 8]
mov edx, dword [eax + 0x38]
inc ebx
add esi, 0x28
call fcn.10001140
lea ecx, [edi + eax]
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 0xc]
movzx eax, word [eax + 6]
cmp ebx, eax
jl 0x10001420
mov dword [0x1009fd00], ebx
pop ebx
pop edi
mov eax, 1
pop esi
mov esp, ebp
pop ebp
ret
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret