Function at 0x10040130
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1016e14e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
push edi
push 0x18
mov dword [esi], 0x101988b0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
call fcn.100cd0b0
add esp, 4
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [esi + 4], eax
mov dword [ebp - 4], 0
mov edx, dword [ebp + 0xc]
cmp edx, 1
jne 0x1004018d
lea ecx, [edx + 2]
jmp 0x10040196
mov ecx, edx
neg ecx
sbb ecx, ecx
add ecx, 2
lea eax, [esi + 0x10]
mov dword [esi + 0xc], ecx
mov dword [eax], 0x101988b4
mov byte [ebp - 4], 1
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], 0x2000
cmp ecx, 1
je 0x100401ca
push 0x1000
push 0x2000
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll__aligned_malloc]
add esp, 8
mov edx, eax
cmp dword [esi + 0x18], 0
mov dword [esi + 0x1c], edx
mov dword [esi + 0x20], 0
jbe 0x100401e2
test edx, edx
je 0x10040e50
cmp dword [esi + 0xc], 2
jne 0x10040217
mov ecx, dword [esi + 0x14]
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, 0x101988b4
jne 0x10040e68
lea eax, [ebp + 0xc]
push eax
push 0x40
push 0x2000
push dword [esi + 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x10040e77
mov dword [ebp - 4], 2
lea ecx, [esi + 0x24]
mov dword [esi], 0x101988ac
call fcn.1003e440
and dword [esi + 0x78], 0xfffffff8
mov word [esi + 0x74], 0x400
mov eax, dword [esi + 0x74]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x74], eax
and dword [esi + 0x80], 0xfffffff8
mov word [esi + 0x7c], 0x401
mov eax, dword [esi + 0x7c]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x7c], eax
and dword [esi + 0x88], 0xfffffff8
mov word [esi + 0x84], 0x402
mov eax, dword [esi + 0x84]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x84], eax
and dword [esi + 0x90], 0xfffffff8
mov word [esi + 0x8c], 0x403
mov eax, dword [esi + 0x8c]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x8c], eax
and dword [esi + 0x98], 0xfffffff8
mov word [esi + 0x94], 0x404
mov eax, dword [esi + 0x94]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x94], eax
and dword [esi + 0xa0], 0xfffffff8
mov word [esi + 0x9c], 0x405
mov eax, dword [esi + 0x9c]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x9c], eax
and dword [esi + 0xa8], 0xfffffff8
mov word [esi + 0xa4], 0x406
mov eax, dword [esi + 0xa4]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0xa4], eax
and dword [esi + 0xb0], 0xfffffff8
mov word [esi + 0xac], 0x407
mov eax, dword [esi + 0xac]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0xac], eax
lea eax, [esi + 0xb4]
and dword [eax + 4], 0xfffffff8
mov word [eax], 0x1000
mov ecx, dword [eax]
and ecx, 0xc080ffff
or ecx, 0x800000
mov dword [eax], ecx
and dword [esi + 0xc0], 0xfffffff8
mov word [esi + 0xbc], 0x1001
mov ecx, dword [esi + 0xbc]
and ecx, 0xc080ffff
or ecx, 0x800000
mov dword [esi + 0xbc], ecx
and dword [esi + 0xc8], 0xfffffff8
mov word [esi + 0xc4], 0x1002
mov ecx, dword [esi + 0xc4]
and ecx, 0xc080ffff
or ecx, 0x800000
mov dword [esi + 0xc4], ecx
and dword [esi + 0xd0], 0xfffffff8
mov word [esi + 0xcc], 0x1003
mov ecx, dword [esi + 0xcc]
and ecx, 0xc080ffff
or ecx, 0x800000
mov dword [esi + 0xcc], ecx
mov word [esi + 0xd4], 0x1004
mov ecx, dword [esi + 0xd4]
and ecx, 0xc080ffff
and dword [esi + 0xd8], 0xfffffff8
lea edi, [esi + 0x134]
or ecx, 0x800000
lea ebx, [esi + 0x13c]
mov dword [esi + 0xd4], ecx
and dword [esi + 0xe0], 0xfffffff8
mov word [esi + 0xdc], 0x1005
mov ecx, dword [esi + 0xdc]
and ecx, 0xc080ffff
or ecx, 0x800000
mov dword [esi + 0xdc], ecx
and dword [esi + 0xe8], 0xfffffff8
mov word [esi + 0xe4], 0x1006
mov ecx, dword [esi + 0xe4]
and ecx, 0xc080ffff
or ecx, 0x800000
mov dword [esi + 0xe4], ecx
and dword [esi + 0xf0], 0xfffffff8
mov word [esi + 0xec], 0x1007
mov ecx, dword [esi + 0xec]
and ecx, 0xc080ffff
or ecx, 0x800000
mov dword [esi + 0xec], ecx
and dword [esi + 0xf8], 0xfffffff8
mov word [esi + 0xf4], 0x2000
mov ecx, dword [esi + 0xf4]
and ecx, 0xc100ffff
or ecx, 0x1000000
mov dword [esi + 0xf4], ecx
and dword [esi + 0x100], 0xfffffff8
mov word [esi + 0xfc], 0x2001
mov ecx, dword [esi + 0xfc]
and ecx, 0xc100ffff
or ecx, 0x1000000
mov dword [esi + 0xfc], ecx
and dword [esi + 0x108], 0xfffffff8
mov word [esi + 0x104], 0x2002
mov ecx, dword [esi + 0x104]
and ecx, 0xc100ffff
or ecx, 0x1000000
mov dword [esi + 0x104], ecx
and dword [esi + 0x110], 0xfffffff8
mov word [esi + 0x10c], 0x2003
mov ecx, dword [esi + 0x10c]
and ecx, 0xc100ffff
or ecx, 0x1000000
mov dword [esi + 0x10c], ecx
and dword [esi + 0x118], 0xfffffff8
mov word [esi + 0x114], 0x2004
mov ecx, dword [esi + 0x114]
and ecx, 0xc100ffff
or ecx, 0x1000000
mov dword [esi + 0x114], ecx
and dword [esi + 0x120], 0xfffffff8
mov word [esi + 0x11c], 0x2005
mov ecx, dword [esi + 0x11c]
and ecx, 0xc100ffff
or ecx, 0x1000000
mov dword [esi + 0x11c], ecx
and dword [esi + 0x128], 0xfffffff8
mov word [esi + 0x124], 0x2006
mov ecx, dword [esi + 0x124]
and ecx, 0xc100ffff
or ecx, 0x1000000
mov dword [esi + 0x124], ecx
and dword [esi + 0x130], 0xfffffff8
mov word [esi + 0x12c], 0x2007
mov ecx, dword [esi + 0x12c]
and ecx, 0xc100ffff
or ecx, 0x1000000
mov dword [esi + 0x12c], ecx
and dword [edi + 4], 0xfffffff8
mov word [edi], 0x4000
mov ecx, dword [edi]
and ecx, 0xc200ffff
or ecx, 0x2000000
mov dword [edi], ecx
mov word [ebx], 0x4001
mov ecx, dword [ebx]
and ecx, 0xc200ffff
or ecx, 0x2000000
and dword [ebx + 4], 0xfffffff8
lea edx, [esi + 0x144]
mov dword [ebx], ecx
and dword [edx + 4], 0xfffffff8
mov word [edx], 0x4002
mov ecx, dword [edx]
and ecx, 0xc200ffff
or ecx, 0x2000000
mov dword [edx], ecx
lea edx, [esi + 0x14c]
and dword [edx + 4], 0xfffffff8
mov word [edx], 0x4003
mov ecx, dword [edx]
and ecx, 0xc200ffff
or ecx, 0x2000000
mov dword [edx], ecx
lea edx, [esi + 0x154]
and dword [edx + 4], 0xfffffff8
mov word [edx], 0x4004
mov ecx, dword [edx]
and ecx, 0xc200ffff
or ecx, 0x2000000
mov dword [edx], ecx
lea edx, [esi + 0x15c]
and dword [edx + 4], 0xfffffff8
mov word [edx], 0x4005
mov ecx, dword [edx]
and ecx, 0xc200ffff
or ecx, 0x2000000
mov dword [edx], ecx
lea edx, [esi + 0x164]
and dword [edx + 4], 0xfffffff8
mov word [edx], 0x4006
mov ecx, dword [edx]
and ecx, 0xc200ffff
or ecx, 0x2000000
mov dword [edx], ecx
lea edx, [esi + 0x16c]
mov word [edx], 0x4007
mov ecx, dword [edx]
and ecx, 0xc200ffff
or ecx, 0x2000000
and dword [edx + 4], 0xfffffff8
mov dword [edx], ecx
lea ecx, [esi + 0x174]
mov edx, 0x10
mov dword [ecx], eax
lea ecx, [ecx + 4]
add eax, 8
sub edx, 1
jne 0x100406c1
mov dword [esi + 0x1b4], edi
lea eax, [esi + 0x144]
mov dword [esi + 0x1bc], eax
lea eax, [esi + 0x14c]
mov dword [esi + 0x1c0], eax
lea eax, [esi + 0x154]
mov dword [esi + 0x1c4], eax
lea eax, [esi + 0x15c]
mov dword [esi + 0x1c8], eax
lea eax, [esi + 0x164]
mov dword [esi + 0x1cc], eax
lea eax, [esi + 0x16c]
mov dword [esi + 0x1d0], eax
mov dword [esi + 0x1b8], ebx
and dword [esi + 0x1d8], 0xfffffff8
mov word [esi + 0x1d4], 0x200
mov eax, dword [esi + 0x1d4]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x1d4], eax
and dword [esi + 0x1e0], 0xfffffff8
mov word [esi + 0x1dc], 0x201
mov eax, dword [esi + 0x1dc]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x1dc], eax
and dword [esi + 0x1e8], 0xfffffff8
mov word [esi + 0x1e4], 0x202
mov eax, dword [esi + 0x1e4]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x1e4], eax
and dword [esi + 0x1f0], 0xfffffff8
mov word [esi + 0x1ec], 0x203
mov eax, dword [esi + 0x1ec]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x1ec], eax
and dword [esi + 0x1f8], 0xfffffff8
mov word [esi + 0x1f4], 0x204
mov eax, dword [esi + 0x1f4]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x1f4], eax
and dword [esi + 0x200], 0xfffffff8
mov word [esi + 0x1fc], 0x205
mov eax, dword [esi + 0x1fc]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x1fc], eax
and dword [esi + 0x208], 0xfffffff8
mov word [esi + 0x204], 0x206
mov eax, dword [esi + 0x204]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x204], eax
and dword [esi + 0x210], 0xfffffff8
mov word [esi + 0x20c], 0x207
mov eax, dword [esi + 0x20c]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x20c], eax
and dword [esi + 0x218], 0xfffffff8
mov word [esi + 0x214], 0x200
mov eax, dword [esi + 0x214]
and eax, 0xc010ffff
or eax, 0x100000
mov dword [esi + 0x214], eax
and dword [esi + 0x220], 0xfffffff8
mov word [esi + 0x21c], 0x201
mov eax, dword [esi + 0x21c]
and eax, 0xc010ffff
or eax, 0x100000
mov dword [esi + 0x21c], eax
mov word [esi + 0x224], 0x202
mov eax, dword [esi + 0x224]
and eax, 0xc010ffff
or eax, 0x100000
and dword [esi + 0x228], 0xfffffff8
mov dword [esi + 0x224], eax
mov word [esi + 0x22c], 0x203
and dword [esi + 0x230], 0xfffffff8
mov eax, dword [esi + 0x22c]
and eax, 0xc010ffff
or eax, 0x100000
mov dword [esi + 0x22c], eax
and dword [esi + 0x238], 0xfffffff8
mov word [esi + 0x234], 0x204
mov eax, dword [esi + 0x234]
and eax, 0xc010ffff
or eax, 0x100000
mov dword [esi + 0x234], eax
and dword [esi + 0x240], 0xfffffff8
mov word [esi + 0x23c], 0x205
mov eax, dword [esi + 0x23c]
and eax, 0xc010ffff
or eax, 0x100000
mov dword [esi + 0x23c], eax
and dword [esi + 0x248], 0xfffffff8
mov word [esi + 0x244], 0x206
mov eax, dword [esi + 0x244]
and eax, 0xc010ffff
or eax, 0x100000
mov dword [esi + 0x244], eax
and dword [esi + 0x250], 0xfffffff8
mov word [esi + 0x24c], 0x207
mov eax, dword [esi + 0x24c]
and eax, 0xc010ffff
or eax, 0x100000
mov dword [esi + 0x24c], eax
and dword [esi + 0x258], 0xfffffff8
mov word [esi + 0x254], 0x200
mov eax, dword [esi + 0x254]
and eax, 0xc008ffff
or eax, 0x80000
mov dword [esi + 0x254], eax
and dword [esi + 0x260], 0xfffffff8
mov word [esi + 0x25c], 0x201
mov eax, dword [esi + 0x25c]
and eax, 0xc008ffff
or eax, 0x80000
mov dword [esi + 0x25c], eax
and dword [esi + 0x268], 0xfffffff8
mov word [esi + 0x264], 0x202
mov eax, dword [esi + 0x264]
and eax, 0xc008ffff
or eax, 0x80000
mov dword [esi + 0x264], eax
and dword [esi + 0x270], 0xfffffff8
mov word [esi + 0x26c], 0x203
mov eax, dword [esi + 0x26c]
and eax, 0xc008ffff
or eax, 0x80000
mov dword [esi + 0x26c], eax
and dword [esi + 0x278], 0xfffffff8
mov word [esi + 0x274], 0x204
mov eax, dword [esi + 0x274]
and eax, 0xc008ffff
or eax, 0x80000
mov dword [esi + 0x274], eax
and dword [esi + 0x280], 0xfffffff8
mov word [esi + 0x27c], 0x205
mov eax, dword [esi + 0x27c]
and eax, 0xc008ffff
or eax, 0x80000
mov dword [esi + 0x27c], eax
and dword [esi + 0x288], 0xfffffff8
mov word [esi + 0x284], 0x206
mov eax, dword [esi + 0x284]
and eax, 0xc008ffff
or eax, 0x80000
mov dword [esi + 0x284], eax
mov word [esi + 0x28c], 0x207
mov eax, dword [esi + 0x28c]
and eax, 0xc008ffff
or eax, 0x80000
and dword [esi + 0x290], 0xfffffff8
mov dword [esi + 0x28c], eax
mov dword [esi + 0x294], edx
mov byte [esi + 0x298], dl
mov dword [esi + 0x29c], 8
mov byte [esi + 0x2a0], dl
mov dword [esi + 0x2a4], 0x10
mov byte [esi + 0x2a8], dl
mov dword [esi + 0x2ac], 0x20
mov byte [esi + 0x2b0], dl
mov dword [esi + 0x2b4], 0x40
mov byte [esi + 0x2b8], dl
mov dword [esi + 0x2bc], 0x80
mov byte [esi + 0x2c0], dl
mov dword [esi + 0x2c4], 0x100
mov byte [esi + 0x2c8], dl
mov dword [esi + 0x2cc], 0x200
mov byte [esi + 0x2d0], dl
mov dword [esi + 0x2d4], edx
mov byte [esi + 0x2d8], 1
mov dword [esi + 0x2dc], 0x80
mov byte [esi + 0x2e0], 1
mov dword [esi + 0x2e4], 0x100
mov byte [esi + 0x2e8], 1
mov dword [esi + 0x2ec], 0x200
mov byte [esi + 0x2f0], 1
and dword [esi + 0x2f8], 0xfffffff8
mov word [esi + 0x2f4], 0x800
mov eax, dword [esi + 0x2f4]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x2f4], eax
and dword [esi + 0x300], 0xfffffff8
mov word [esi + 0x2fc], 0x801
mov eax, dword [esi + 0x2fc]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x2fc], eax
and dword [esi + 0x308], 0xfffffff8
mov word [esi + 0x304], 0x802
mov eax, dword [esi + 0x304]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x304], eax
and dword [esi + 0x310], 0xfffffff8
mov word [esi + 0x30c], 0x803
mov eax, dword [esi + 0x30c]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x30c], eax
and dword [esi + 0x318], 0xfffffff8
mov word [esi + 0x314], 0x804
mov eax, dword [esi + 0x314]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x314], eax
and dword [esi + 0x320], 0xfffffff8
mov word [esi + 0x31c], 0x805
mov eax, dword [esi + 0x31c]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x31c], eax
and dword [esi + 0x328], 0xfffffff8
mov word [esi + 0x324], 0x806
mov eax, dword [esi + 0x324]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x324], eax
and dword [esi + 0x330], 0xfffffff8
mov word [esi + 0x32c], 0x807
mov eax, dword [esi + 0x32c]
and eax, 0xc020ffff
or eax, 0x200000
mov dword [esi + 0x32c], eax
and dword [esi + 0x338], 0xfffffff8
mov word [esi + 0x334], 0x8000
mov eax, dword [esi + 0x334]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x334], eax
mov word [esi + 0x33c], 0x8001
mov eax, dword [esi + 0x33c]
and eax, 0xc040ffff
or eax, 0x400000
and dword [esi + 0x340], 0xfffffff8
mov dword [esi + 0x33c], eax
mov word [esi + 0x344], 0x8002
mov eax, dword [esi + 0x344]
and dword [esi + 0x348], 0xfffffff8
and eax, 0xc040ffff
or eax, 0x400000
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x344], eax
and dword [esi + 0x350], 0xfffffff8
mov word [esi + 0x34c], 0x8003
mov eax, dword [esi + 0x34c]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x34c], eax
and dword [esi + 0x358], 0xfffffff8
mov word [esi + 0x354], 0x8004
mov eax, dword [esi + 0x354]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x354], eax
and dword [esi + 0x360], 0xfffffff8
mov word [esi + 0x35c], 0x8005
mov eax, dword [esi + 0x35c]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x35c], eax
and dword [esi + 0x368], 0xfffffff8
mov word [esi + 0x364], 0x8006
mov eax, dword [esi + 0x364]
and eax, 0xc040ffff
or eax, 0x400000
mov dword [esi + 0x364], eax
mov word [esi + 0x36c], 0x8007
mov eax, dword [esi + 0x36c]
and eax, 0xc040ffff
or eax, 0x400000
and dword [esi + 0x370], 0xfffffff8
mov dword [esi + 0x36c], eax
mov eax, esi
mov dword [esi + 0x374], 5
mov dword [esi + 0x378], 1
mov dword [esi + 0x37c], 2
mov dword [esi + 0x380], 3
mov dword [esi + 0x384], 4
mov dword [esi + 0x38c], edx
mov dword [esi + 0x390], 1
mov dword [esi + 0x394], 2
mov dword [esi + 0x398], 3
mov dword [esi + 0x39c], 4
mov dword [esi + 0x3a0], 5
pop edi
mov dword [esi + 0x24], esi
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret 0xc
push 0x16
lea ecx, [ebp - 0x20]
call fcn.1003deb0
push 0x101aac88
lea eax, [ebp - 0x20]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
call edx
test al, al
je 0x10040217
jmp 0x100401fb
mov ecx, dword [esi + 0x14]
push dword [esi + 0x1c]
mov eax, dword [ecx]
call dword [eax + 4]
push 0xe
lea ecx, [ebp - 0x30]
call fcn.1003deb0
push 0x101aac88
lea eax, [ebp - 0x30]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3