Function at 0x40f350
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x447cb0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x45b4b8]
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.0040b080
mov eax, dword [ebp + 0x18]
cmp dword [eax], 0
jne 0x40f54e
mov ebx, dword [ebp + 0xc]
xor edi, edi
cmp dword [ebp + 0x20], edi
jne 0x40f3da
mov eax, dword [ebx]
test eax, eax
cmovne edi, eax
mov eax, dword [esi + 0x2c]
test eax, eax
je 0x40f3d8
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 0x40f3fc
push 0x30
push dword [0x45e9b0]
push dword [0x45e9ec]
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
xor esi, esi
jmp 0x40f5bf
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.0040b080
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.0040b680
mov edx, dword [ebx]
lea eax, [ebp - 0x24]
add esp, 8
mov ecx, esi
push eax
push dword [ebp - 0x30]
call fcn.0040b680
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.00412980
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.00412980
and dword [ebp + 8], eax
lea eax, [ebp - 0x24]
mov ecx, dword [ebp + 0xc]
push eax
push esi
call fcn.00412980
mov esi, dword [ebp + 8]
and esi, eax
test edi, edi
je 0x40f4c5
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
test eax, eax
je 0x40f4c5
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 0x40f50f
test eax, eax
je 0x40f4de
cmp dword [ebp - 0x18], esi
jle 0x40f4de
push eax
call fcn.0042dd04
add esp, 4
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40f4f4
cmp dword [ebp - 0x20], 0
jle 0x40f4f4
push eax
call fcn.0042dd04
add esp, 4
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40f561
test ebx, ebx
jle 0x40f561
push eax
call fcn.0042dd04
add esp, 4
xor esi, esi
jmp 0x40f5bf
test eax, eax
je 0x40f522
cmp dword [ebp - 0x18], 0
jle 0x40f522
push eax
call fcn.0042dd04
add esp, 4
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x40f538
cmp dword [ebp - 0x20], 0
jle 0x40f538
push eax
call fcn.0042dd04
add esp, 4
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x40f587
test ebx, ebx
jle 0x40f587
push eax
call fcn.0042dd04
add esp, 4
jmp 0x40f587
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
lea ecx, [esi + 0x2c]
call fcn.00412980
test eax, eax
jne 0x40f565
xor esi, esi
jmp 0x40f5bf
mov eax, dword [esi + 0x2c]
mov esi, dword [ebp + 0xc]
test eax, eax
je 0x40f581
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 0x40f5ba
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 0x40f5d6
mov ecx, dword [ebp - 0x30]
test ecx, ecx
jle 0x40f5d6
push eax
call fcn.0042dd04
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