Function at 0x40e800
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x10], 0
cmp dword [ebp + 8], 0
jne 0x40e867
xor eax, eax
jmp 0x40ebeb
push 0x40
push 0x3000
mov eax, dword [ebp + 0x10]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.DLL_VirtualAllocEx]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40e891
jmp 0x40ebe8
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteProcessMemory]
test eax, eax
jne 0x40e8b9
jmp 0x40ebe8
cmp dword [ebp + 0x14], 0
je 0x40e94e
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x50], ecx
mov edx, dword [ebp - 0x50]
add edx, 2
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x50]
mov cx, word [eax]
mov word [ebp - 0x56], cx
add dword [ebp - 0x50], 2
cmp word [ebp - 0x56], 0
jne 0x40e8d2
mov edx, dword [ebp - 0x50]
sub edx, dword [ebp - 0x54]
sar edx, 1
mov dword [ebp - 0x5c], edx
mov eax, dword [ebp - 0x5c]
lea ecx, [eax + eax + 2]
mov dword [ebp - 0x24], ecx
push 0x40
push 0x3000
mov edx, dword [ebp - 0x24]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualAllocEx]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x40e926
jmp 0x40ebe8
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x24]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x3c]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteProcessMemory]
test eax, eax
jne 0x40e94e
jmp 0x40ebe8
cmp dword [ebp + 0x18], 0
je 0x40e9dd
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x60]
add ecx, 1
mov dword [ebp - 0x64], ecx
mov edx, dword [ebp - 0x60]
mov al, byte [edx]
mov byte [ebp - 0x65], al
add dword [ebp - 0x60], 1
cmp byte [ebp - 0x65], 0
jne 0x40e967
mov ecx, dword [ebp - 0x60]
sub ecx, dword [ebp - 0x64]
mov dword [ebp - 0x6c], ecx
mov edx, dword [ebp - 0x6c]
add edx, 1
mov dword [ebp - 0x14], edx
push 0x40
push 0x3000
mov eax, dword [ebp - 0x14]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.DLL_VirtualAllocEx]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x40e9b5
jmp 0x40ebe8
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x14]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteProcessMemory]
test eax, eax
jne 0x40e9dd
jmp 0x40ebe8
cmp dword [ebp + 0x1c], 0
je 0x40ea72
mov ecx, dword [ebp + 0x1c]
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp - 0x70]
add edx, 2
mov dword [ebp - 0x74], edx
mov eax, dword [ebp - 0x70]
mov cx, word [eax]
mov word [ebp - 0x76], cx
add dword [ebp - 0x70], 2
cmp word [ebp - 0x76], 0
jne 0x40e9f6
mov edx, dword [ebp - 0x70]
sub edx, dword [ebp - 0x74]
sar edx, 1
mov dword [ebp - 0x7c], edx
mov eax, dword [ebp - 0x7c]
lea ecx, [eax + eax + 2]
mov dword [ebp - 0x38], ecx
push 0x40
push 0x3000
mov edx, dword [ebp - 0x38]
push edx
push 0
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_VirtualAllocEx]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x40ea4a
jmp 0x40ebe8
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [ebp + 0x1c]
push eax
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteProcessMemory]
test eax, eax
jne 0x40ea72
jmp 0x40ebe8
mov dword [ebp - 0x10], 0x20
push 0x40
push 0x3000
mov eax, dword [ebp - 0x10]
push eax
push 0
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.DLL_VirtualAllocEx]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x40eaa3
jmp 0x40ebe8
mov dword [ebp - 0x1c], 0x10
mov edx, dword [ebp - 0x1c]
push edx
call fcn.0041692e
add esp, 4
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jne 0x40eacf
jmp 0x40ebe8
mov ecx, dword [ebp - 0x1c]
push ecx
push 0
mov edx, dword [ebp - 0x34]
push edx
call fcn.00418320
add esp, 0xc
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x3c]
mov dword [edx + 4], eax
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 4]
mov dword [eax + 0xc], ecx
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.DLL_WriteProcessMemory]
test eax, eax
jne 0x40eb47
mov ecx, dword [ebp - 0x34]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x48]
push edx
call fcn.0041747c
add esp, 4
mov dword [ebp - 0x34], 0
jmp 0x40ebe8
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x4c], eax
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.0041747c
add esp, 4
mov dword [ebp - 0x34], 0
push 0x40
push 0x3000
push 0x1e9c
push 0
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.DLL_VirtualAllocEx]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x40eb85
jmp 0x40ebe8
lea eax, [ebp - 0x28]
push eax
push 0x1e9c
push 0x43ac98
mov ecx, dword [ebp - 0x40]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteProcessMemory]
test eax, eax
jne 0x40eba9
jmp 0x40ebe8
mov dword [ebp - 0xc], 0
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [ebp - 0x2c]
push ecx
mov edx, dword [ebp - 0x40]
push edx
push 0
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0040f340
add esp, 0x1c
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40ebe8
mov ecx, dword [ebp - 8]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [ebp - 0x30], 1
mov eax, dword [ebp - 0x30]
mov esp, ebp
pop ebp
ret