Function at 0x100012a0
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call
Get system information on windows
Parse pe header

Disassembly:
sub esp, 0x2c
push ebx
push ebp
mov ebp, dword [esp + 0x38]
push esi
test ebp, ebp
push edi
je 0x10001522
mov esi, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push 0x40
push ebp
call esi
cmp eax, 1
je 0x10001522
cmp word [ebp], 0x5a4d
jne 0x10001522
mov ebx, dword [ebp + 0x3c]
push 0xf8
add ebx, ebp
push ebx
call esi
cmp eax, 1
je 0x10001522
cmp dword [ebx], 0x4550
jne 0x10001522
cmp word [ebx + 0x14], 0xe0
jne 0x10001522
cmp word [ebx + 0x18], 0x10b
jne 0x10001522
mov cx, word [ebx + 6]
cmp cx, 1
jae 0x10001324
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
add esp, 0x2c
ret
mov eax, ecx
lea edx, [ebx + 0xf8]
and eax, 0xffff
mov dword [esp + 0x14], 0
lea esi, [eax + eax*4]
shl esi, 3
sub esi, ebp
add esi, edx
mov edi, esi
test cx, cx
mov dword [esp + 0x40], edi
jbe 0x10001387
xor edi, edi
lea ecx, [edx + 0xc]
mov dword [esp + 0x10], eax
mov eax, dword [ecx]
mov edx, dword [ecx + 4]
add edx, eax
cmp dword [esp + 0x40], edx
jae 0x10001368
mov dword [esp + 0x40], edx
cmp dword [ebx + 0x88], eax
jne 0x10001374
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x10]
inc edi
add ecx, 0x28
dec eax
mov dword [esp + 0x10], eax
jne 0x10001357
mov edi, dword [esp + 0x40]
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [esp + 0x1c]
mov eax, edi
xor edx, edx
div ecx
xor edx, edx
mov dword [esp + 0x40], eax
mov eax, edi
div ecx
test edx, edx
je 0x100013ae
inc dword [esp + 0x40]
imul ecx, dword [esp + 0x40]
push 0x40
push 0x1000
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
test edi, edi
je 0x10001522
push esi
push ebp
push edi
call fcn.10002640
xor esi, esi
add esp, 0xc
cmp word [ebx + 6], si
jbe 0x10001413
mov eax, esi
and eax, 0xffff
lea ecx, [eax + eax*4]
lea eax, [ebx + 0xf8]
mov edx, dword [eax + ecx*8 + 0x10]
lea eax, [eax + ecx*8]
push edx
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0xc]
add ecx, ebp
add edx, edi
push ecx
push edx
call fcn.10002640
add esp, 0xc
inc esi
cmp si, word [ebx + 6]
jb 0x100013e0
mov esi, dword [edi + 0x3c]
mov ebx, dword [esp + 0x14]
add esi, edi
mov dword [0x10011638], edi
test ebx, ebx
mov dword [esp + 0x10], esi
je 0x10001452
call fcn.10001290
cmp eax, 1
jne 0x10001452
lea eax, [ebx + ebx*4]
mov edx, dword [esi + eax*8 + 0x104]
lea eax, [esi + eax*8 + 0xf8]
add edx, ebp
mov dword [eax + 0xc], edx
mov ecx, dword [eax + 0x14]
add ecx, ebp
mov dword [eax + 0x14], ecx
mov ebx, dword [esi + 0x80]
test ebx, ebx
je 0x10001514
add ebx, edi
mov dword [esp + 0x40], ebx
mov eax, dword [ebx + 4]
test eax, eax
jne 0x10001478
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x1000152c
mov esi, dword [ebx + 0xc]
mov edx, dword [0x10011638]
add esi, edx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebp, eax
test ebp, ebp
jne 0x1000149d
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebp, eax
test ebp, ebp
je 0x10001500
mov eax, dword [ebx]
test eax, eax
je 0x100014a8
lea ebx, [eax + edi]
jmp 0x100014ad
mov ebx, dword [ebx + 0x10]
add ebx, edi
mov ecx, dword [esp + 0x40]
mov eax, dword [ebx]
mov esi, dword [ecx + 0x10]
add esi, edi
test eax, eax
je 0x100014ea
test eax, 0x80000000
je 0x100014cb
and eax, 0xffff
push eax
jmp 0x100014d0
lea edx, [eax + edi + 2]
push edx
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test esi, esi
mov dword [esi], eax
je 0x10001514
mov eax, dword [ebx + 4]
add ebx, 4
add esi, 4
test eax, eax
jne 0x100014bc
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x10]
add eax, 0x14
mov dword [esp + 0x40], eax
mov ebx, eax
jmp 0x10001466
push 0x10
push str.Error_in_LoadPbDllFromMemory__
push str.Cant_find_required_Dll
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret
mov edx, dword [esi + 0xa0]
test edx, edx
je 0x10001596
mov eax, dword [edx + edi]
add edx, edi
test eax, eax
je 0x10001596
mov eax, dword [edx + 4]
lea esi, [edx + 8]
add eax, edx
cmp esi, eax
jae 0x1000158e
xor eax, eax
mov ax, word [esi]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x1000157e
mov ebx, dword [edx]
and eax, 0xfff
add eax, ebx
mov ebx, dword [esp + 0x10]
add eax, edi
mov ecx, edi
mov ebp, dword [ebx + 0x34]
mov ebx, dword [eax]
sub ecx, ebp
add ebx, ecx
mov dword [eax], ebx
jmp 0x10001582
test ecx, ecx
jne 0x10001514
mov eax, dword [edx + 4]
add esi, 2
add eax, edx
cmp esi, eax
jb 0x1000154b
add edx, dword [edx + 4]
cmp dword [edx], 0
jne 0x1000153f
mov dword [0x1001163c], edi
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2c
ret