Function at 0x40e910
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x447060
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x45a4b8]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov ecx, dword [ebp + 0x14]
lea edx, [ebp - 0x34]
mov dword [ebp - 4], 0
call fcn.0040a020
mov eax, dword [ebp + 0x18]
cmp dword [eax], 0
jne 0x40eb0e
mov ebx, dword [ebp + 0xc]
xor edi, edi
cmp dword [ebp + 0x20], edi
jne 0x40e99a
mov eax, dword [ebx]
test eax, eax
cmovne edi, eax
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x40e998
push 0x40
push 0x3000
push 0x1000
push 0
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov dword [ebx], eax
cmp dword [ebx], 0
jne 0x40e9bc
push 0x30
push dword [0x45d890]
push dword [0x45d8cc]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor esi, esi
jmp 0x40eb7f
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp + 0x10]
lea edx, [ebp - 0x2c]
mov byte [ebp - 4], 3
call fcn.0040a020
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x1c]
mov edx, dword [ebp - 0x30]
push ecx
mov ecx, dword [ebx]
add ecx, dword [ebp - 0x28]
push eax
push 5
lea edx, [edx + esi]
call fcn.0040a620
mov edx, dword [ebx]
lea eax, [ebp - 0x24]
add esp, 8
mov ecx, esi
push eax
push dword [ebp - 0x30]
call fcn.0040a620
mov eax, dword [ebp - 0x14]
lea ecx, [ebp - 0x2c]
add esp, 0xc
add eax, 0x2c
mov dword [ebp + 0xc], eax
push ecx
push dword [ebx]
mov ecx, eax
call fcn.00412a30
mov ecx, dword [ebx]
mov ebx, dword [ebp - 0x28]
add ecx, ebx
mov dword [ebp + 8], eax
lea eax, [ebp - 0x1c]
push eax
push ecx
mov ecx, dword [ebp + 0xc]
call fcn.00412a30
and dword [ebp + 8], eax
lea eax, [ebp - 0x24]
mov ecx, dword [ebp + 0xc]
push eax
push esi
call fcn.00412a30
mov esi, dword [ebp + 8]
and esi, eax
test edi, edi
je 0x40ea85
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x40ea85
push 0x8000
push 0
push edi
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov eax, dword [ebp - 0x1c]
test esi, esi
jne 0x40eacf
test eax, eax
je 0x40ea9e
cmp dword [ebp - 0x18], esi
jle 0x40ea9e
push eax
call fcn.0042dce4
add esp, 4
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40eab4
cmp dword [ebp - 0x20], 0
jle 0x40eab4
push eax
call fcn.0042dce4
add esp, 4
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40eb21
test ebx, ebx
jle 0x40eb21
push eax
call fcn.0042dce4
add esp, 4
xor esi, esi
jmp 0x40eb7f
test eax, eax
je 0x40eae2
cmp dword [ebp - 0x18], 0
jle 0x40eae2
push eax
call fcn.0042dce4
add esp, 4
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40eaf8
cmp dword [ebp - 0x20], 0
jle 0x40eaf8
push eax
call fcn.0042dce4
add esp, 4
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40eb47
test ebx, ebx
jle 0x40eb47
push eax
call fcn.0042dce4
add esp, 4
jmp 0x40eb47
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
lea ecx, [esi + 0x2c]
call fcn.00412a30
test eax, eax
jne 0x40eb25
xor esi, esi
jmp 0x40eb7f
mov eax, dword [esi + 0x2c]
mov esi, dword [ebp + 0xc]
test eax, eax
je 0x40eb41
push 0x8000
push 0
push dword [esi]
push dword [eax + 0x1c]
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov dword [esi], 0
mov eax, dword [ebp + 0x18]
xor ebx, ebx
cmp dword [eax], ebx
sete bl
cmp dword [ebp + 0x1c], 0
mov dword [eax], ebx
je 0x40eb7a
push 0x40005
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
xor eax, eax
test ebx, ebx
setne al
add eax, 0x95
push eax
call dword [sym.imp.WINMM.dll_PlaySoundW]
mov esi, 1
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x40eb96
mov ecx, dword [ebp - 0x30]
test ecx, ecx
jle 0x40eb96
push eax
call fcn.0042dce4
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c