Function at 0x10040f80
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
lea ebp, [esp - 0x68]
sub esp, 0x264
mov byte [ebp + 0x67], 0
mov eax, dword [ebp + 0x70]
push eax
push 0x3e3
call fcn.1003cb10
mov dword [ebp + 0x60], eax
cmp dword [ebp + 0x60], 0
je 0x10041273
cmp dword [0x100e0d64], 0
jne 0x10040fc4
push 1
push 0x1007cd10
call fcn.1004ba60
mov dword [0x100e0d64], eax
cmp dword [0x100e0d68], 0
jne 0x10040fde
push 1
push 0x1007cccc
call fcn.1004ba60
mov dword [0x100e0d68], eax
cmp dword [0x100e0d6c], 0
jne 0x10040ff8
push 1
push 0x1007cce4
call fcn.1004ba60
mov dword [0x100e0d6c], eax
cmp dword [0x100e0d70], 0
jne 0x10041012
push 1
push 0x1007ccfc
call fcn.1004ba60
mov dword [0x100e0d70], eax
cmp dword [0x100e0d74], 0
jne 0x1004102c
push 1
push 0x1007cd3c
call fcn.1004ba60
mov dword [0x100e0d74], eax
cmp dword [0x100e0d78], 0
jne 0x10041046
push 1
push 0x1007cd28
call fcn.1004ba60
mov dword [0x100e0d78], eax
mov byte [ebp - 0x1fc], 0xb8
mov ecx, dword [ebp + 0x60]
mov dword [ebp - 0x1fb], ecx
mov byte [ebp - 0x1f7], 0xb9
mov edx, dword [ebp + 0x60]
add edx, 0x245
mov dword [ebp - 0x1f6], edx
mov eax, 0xd1ff
mov word [ebp - 0x1f2], ax
mov dword [ebp - 0x1f0], 0
mov dword [ebp - 0x1ec], 0
mov ecx, dword [ebp + 0x7c]
push ecx
mov edx, dword [ebp + 0x78]
push edx
call fcn.100409c0
add esp, 8
mov dword [ebp - 0x1e8], eax
mov eax, dword [ebp + 0x74]
push eax
call fcn.10055cec
add esp, 4
movzx ecx, ax
shl ecx, 1
mov word [ebp - 0x1df], cx
movzx edx, word [ebp - 0x1df]
add edx, 2
mov word [ebp - 0x1dd], dx
mov eax, 2
imul ecx, eax, 0
mov edx, dword [ebp + 0x60]
lea eax, [edx + ecx + 0x25]
mov dword [ebp - 0x1db], eax
mov ecx, dword [ebp + 0x74]
push ecx
lea edx, [ebp - 0x1d7]
push edx
call fcn.1005618d
add esp, 8
mov eax, dword [0x100e0d64]
mov dword [ebp + 0x31], eax
mov ecx, dword [0x100e0d68]
mov dword [ebp + 0x35], ecx
mov edx, dword [0x100e0d6c]
mov dword [ebp + 0x39], edx
mov eax, dword [0x100e0d70]
mov dword [ebp + 0x3d], eax
mov ecx, dword [0x100e0d74]
mov dword [ebp + 0x41], ecx
mov edx, dword [0x100e0d78]
mov dword [ebp + 0x45], edx
cmp dword [ebp - 0x1e8], 0
je 0x1004125a
lea eax, [ebp + 0x5c]
push eax
push 0x246
lea ecx, [ebp - 0x1fc]
push ecx
mov edx, dword [ebp + 0x60]
push edx
mov eax, dword [ebp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1004125a
cmp dword [ebp + 0x5c], 0x246
jne 0x1004125a
lea ecx, [ebp + 0x5c]
push ecx
push 0x19d
push 0x1007cd78
mov edx, dword [ebp + 0x60]
add edx, 0x245
push edx
mov eax, dword [ebp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1004125a
cmp dword [ebp + 0x5c], 0x19d
jne 0x1004125a
lea ecx, [ebp + 0x5c]
push ecx
push 5
lea edx, [ebp + 0x54]
push edx
mov eax, dword [ebp - 0x1e8]
push eax
mov ecx, dword [ebp + 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
je 0x1004125a
cmp dword [ebp + 0x5c], 5
jne 0x1004125a
lea edx, [ebp + 0x5c]
push edx
push 5
lea eax, [ebp + 0x54]
push eax
mov ecx, dword [ebp + 0x60]
add ecx, 0x18
push ecx
mov edx, dword [ebp + 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x1004125a
cmp dword [ebp + 0x5c], 5
jne 0x1004125a
lea eax, [ebp + 0x50]
push eax
push 0x40
push 5
mov ecx, dword [ebp - 0x1e8]
push ecx
mov edx, dword [ebp + 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
je 0x1004125a
mov byte [ebp + 0x54], 0xe9
mov eax, dword [ebp + 0x60]
sub eax, dword [ebp - 0x1e8]
sub eax, 5
mov dword [ebp + 0x55], eax
lea ecx, [ebp + 0x5c]
push ecx
push 5
lea edx, [ebp + 0x54]
push edx
mov eax, dword [ebp - 0x1e8]
push eax
mov ecx, dword [ebp + 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea edx, [ebp + 0x50]
push edx
mov eax, dword [ebp + 0x50]
push eax
push 5
mov ecx, dword [ebp - 0x1e8]
push ecx
mov edx, dword [ebp + 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov byte [ebp + 0x67], 1
lea eax, [ebp + 0x4c]
push eax
push 0x20
push 0x3e3
mov ecx, dword [ebp + 0x60]
push ecx
mov edx, dword [ebp + 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
mov al, byte [ebp + 0x67]
add ebp, 0x68
mov esp, ebp
pop ebp
ret