Function at 0x5984da0c
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff74
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x88], ebx
mov dword [ebp - 0x8c], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], edx
xor edx, edx
push ebp
push 0x5984dd4d
push dword fs:[edx]
mov dword fs:[edx], esp
mov dword [ebp - 4], ebp
xor edx, edx
push ebp
push 0x5984dce7
push dword fs:[edx]
mov dword fs:[edx], esp
test eax, eax
jle 0x5984da5d
mov edx, dword [ebp - 4]
mov edx, dword [edx]
mov dword [ebp - 4], edx
dec eax
jne 0x5984da52
cmp byte [0x59857b2c], 0
je 0x5984da96
xor edx, edx
push ebp
push 0x5984da8c
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp dword [eax + 4], 0
je 0x5984da82
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5984da96
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
cmp eax, dword [0x59857b30]
jbe 0x5984dab4
cmp eax, dword [0x59857b34]
ja 0x5984dab4
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xor edx, edx
call sub.rtl120.bpl__System__UStrAsg_qqrr20System_UnicodeStringx20System_UnicodeString
cmp dword [ebp - 0x10], 0
je 0x5984dcdd
push 0
lea edx, [ebp - 0x18]
mov eax, dword [ebp - 0x10]
add eax, 4
mov ecx, 4
call sub.madDisAsm_.bpl__Maddisasm_TryRead_qqrpvt1uiui
test al, al
je 0x5984dcdd
push 0x5984dd6c
push 1
lea eax, [ebp - 8]
call sub.rtl120.bpl__System__LStrClr_qqrpv
mov edx, eax
lea ecx, [ebp - 0x19]
mov eax, dword [ebp - 0x18]
call fcn.5981ba08
test al, al
je 0x5984dcdd
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
call sub.rtl120.bpl__System__UStrFromLStr_qqrr20System_UnicodeStringx27System__AnsiStringT_us_i0__
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 4], eax
mov esi, 1
lea edx, [ebp - 0x60]
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
call sub.madDisAsm_.bpl__Maddisasm_ParseCode_qqrpv
mov ebx, 0x32
cmp byte [ebp - 0x60], 0
je 0x5984db98
cmp byte [ebp - 0x5b], 0
je 0x5984db57
mov eax, dword [ebp - 0x44]
mov eax, dword [eax]
and eax, 0xffffff
cmp eax, 0x452ff
jne 0x5984db57
mov esi, 1
jmp 0x5984db98
cmp byte [ebp - 0x5b], 0
je 0x5984db75
mov eax, dword [ebp - 0x44]
mov eax, dword [eax]
and eax, 0xffffff
cmp eax, 0x852ff
jne 0x5984db75
mov esi, 2
jmp 0x5984db98
lea edx, [ebp - 0x84]
mov eax, dword [ebp - 0x40]
call sub.madDisAsm_.bpl__Maddisasm_ParseCode_qqrpv
push esi
lea esi, [ebp - 0x84]
lea edi, [ebp - 0x60]
mov ecx, 9
rep movsd dword es:[edi], dword [esi]
pop esi
dec ebx
jne 0x5984db33
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov ebx, dword [eax + esi*4]
test ebx, ebx
je 0x5984dcdd
mov eax, dword [ebx + 6]
cmp eax, 0x5984d968
je 0x5984dcdd
lea edx, [ebp - 0x3c]
lea eax, [ebp - 0x28]
call fcn.5981a2c0
lea eax, [ebp - 0x8c]
push eax
call sub.kernel32.dll_GetCurrentProcessId
mov cl, 0x30
mov edx, 1
call sub.madBasic_.bpl__Madstrings_IntToHexExA_qqruiic
mov ecx, dword [ebp - 0x8c]
lea eax, [ebp - 0x88]
mov edx, 0x5984dd80
call sub.rtl120.bpl__System__LStrCat3_qqrv
mov eax, dword [ebp - 0x88]
call sub.rtl120.bpl__System__LStrToPChar_qqrx27System__AnsiStringT_us_i0__
push eax
push 0
lea eax, [ebp - 0x28]
push eax
call fcn.59801794
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x5984dcdd
xor edx, edx
push ebp
push 0x5984dcd6
push dword fs:[edx]
mov dword fs:[edx], esp
push 0xffffffffffffffff
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_WaitForSingleObject
xor edx, edx
push ebp
push 0x5984dcb8
push dword fs:[edx]
mov dword fs:[edx], esp
mov eax, dword [ebx + 6]
cmp eax, 0x5984d968
je 0x5984dca1
push 0x40
push 0x1000
push 0xc
push 0
call sub.kernel32.dll_VirtualAlloc
mov ebx, eax
mov byte [ebx], 0xba
mov byte [ebx + 5], 0xb9
mov word [ebx + 0xa], 0xe1ff
mov eax, dword [ebp - 0x10]
mov edx, dword [eax + 4]
mov edx, dword [edx]
mov edx, dword [edx + esi*4]
mov dword [ebx + 1], edx
mov dword [ebx + 6], 0x5984d968
mov eax, dword [eax + 4]
mov eax, dword [eax]
lea eax, [eax + esi*4]
mov dword [ebp - 0x18], eax
mov ecx, ebx
mov edx, ebx
mov eax, dword [ebp - 0x18]
call sym.madExcept_.bpl__Madexcept_PatchPtr_qqrpvt1t1
push 0
push 0
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.kernel32.dll_FlushInstructionCache
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5984dcbf
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_ReleaseMutex
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x5984dcf1
mov eax, dword [ebp - 4]
mov eax, dword [eax + 4]
mov edx, dword [ebp + 8]
mov dword [edx], eax
mov eax, 8
call sub.rtl120.bpl__System__GetMem_qqri
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov edx, dword [ebp - 0xc]
mov dword [eax], edx
mov eax, dword [ebp + 0x10]
mov eax, dword [eax]
mov edx, dword [ebp - 0x10]
mov dword [eax + 4], edx
push 0
call sub.kernel32.dll_SetLastError
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5984dd54
lea eax, [ebp - 0x8c]
mov edx, 2
call sub.rtl120.bpl__System__LStrArrayClr_qqrpvi
lea eax, [ebp - 8]
call sub.rtl120.bpl__System__LStrClr_qqrpv
ret