Function at 0x10019ca0
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
jne 0x10019cbc
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2c
ret
mov esi, dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
push 0x40
push ebp
call esi
cmp eax, 1
je 0x10019fd9
cmp word [ebp], 0x5a4d
jne 0x10019fd9
mov ebx, dword [ebp + 0x3c]
push 0xf8
add ebx, ebp
push ebx
call esi
cmp eax, 1
je 0x10019fcc
cmp dword [ebx], 0x4550
jne 0x10019fcc
cmp word [ebx + 0x14], 0xe0
jne 0x10019fbf
cmp word [ebx + 0x18], 0x10b
jne 0x10019fbf
mov cx, word [ebx + 6]
cmp cx, 1
jae 0x10019d2d
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 0x10019d90
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 0x10019d71
mov dword [esp + 0x40], edx
cmp dword [ebx + 0x88], eax
jne 0x10019d7d
mov dword [esp + 0x14], edi
mov eax, dword [esp + 0x10]
inc edi
add ecx, 0x28
dec eax
mov dword [esp + 0x10], eax
jne 0x10019d60
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 0x10019db7
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
jne 0x10019ddf
pop edi
pop esi
pop ebp
mov eax, 6
pop ebx
add esp, 0x2c
ret
push esi
push ebp
push edi
call sub.MSVCRT.dll_memmove
xor esi, esi
add esp, 0xc
cmp word [ebx + 6], si
jbe 0x10019e25
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 sub.MSVCRT.dll_memmove
add esp, 0xc
inc esi
cmp si, word [ebx + 6]
jb 0x10019df2
mov ebx, dword [edi + 0x3c]
mov esi, dword [esp + 0x14]
add ebx, edi
mov dword [0x1021d44c], edi
test esi, esi
mov dword [esp + 0x40], ebx
je 0x10019e64
call fcn.10019c90
cmp eax, 1
jne 0x10019e64
lea eax, [esi + esi*4]
mov edx, dword [ebx + eax*8 + 0x104]
lea eax, [ebx + 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 esi, dword [ebx + 0x80]
test esi, esi
jne 0x10019e88
push 0x8000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
pop ebp
mov eax, 7
pop ebx
add esp, 0x2c
ret
add esi, edi
mov eax, dword [esi + 4]
mov dword [esp + 0x14], esi
test eax, eax
jne 0x10019e9c
mov eax, dword [esi + 0xc]
test eax, eax
je 0x10019f11
mov eax, dword [esi + 0xc]
mov ecx, dword [0x1021d44c]
add eax, ecx
push eax
push 0
call fcn.100180e0
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x10019f09
mov ebx, dword [esi]
test ebx, ebx
jne 0x10019ec1
mov ebx, dword [esi + 0x10]
mov esi, dword [esi + 0x10]
mov eax, dword [ebx + edi]
add ebx, edi
add esi, edi
test eax, eax
je 0x10019f01
test eax, 0x80000000
je 0x10019ede
and eax, 0xffff
push eax
jmp 0x10019ee3
lea ecx, [eax + edi + 2]
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test esi, esi
mov dword [esi], eax
je 0x10019fa4
mov eax, dword [ebx + 4]
add ebx, 4
add esi, 4
test eax, eax
jne 0x10019ecf
mov ebx, dword [esp + 0x40]
mov esi, dword [esp + 0x14]
add esi, 0x14
jmp 0x10019e8a
mov edx, dword [ebx + 0xa0]
test edx, edx
je 0x10019f83
mov eax, dword [edx + edi]
add edx, edi
test eax, eax
je 0x10019f83
mov ebx, dword [edx + 4]
mov eax, edx
lea esi, [edx + 8]
add eax, ebx
cmp esi, eax
jae 0x10019f77
xor eax, eax
mov ax, word [esi]
mov ecx, eax
and ecx, 0xf000
cmp ecx, 0x3000
jne 0x10019f65
mov ebx, dword [edx]
and eax, 0xfff
add eax, ebx
mov ebx, dword [esp + 0x40]
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 0x10019f69
test ecx, ecx
jne 0x10019fa4
mov ebx, dword [edx + 4]
mov eax, edx
add esi, 2
add eax, ebx
cmp esi, eax
jb 0x10019f32
add edx, dword [edx + 4]
cmp dword [edx], 0
jne 0x10019f24
mov ebx, dword [esp + 0x40]
mov eax, dword [ebx + 0x28]
push 0
add eax, edi
push 1
push edi
mov dword [0x1021d444], eax
call eax
mov dword [0x1021d424], edi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2c
ret
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
pop edi
pop esi
pop ebp
mov eax, 0xa
pop ebx
add esp, 0x2c
ret
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
add esp, 0x2c
ret
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x2c
ret
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
add esp, 0x2c
ret