Function at 0x50e410
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [0x5ed284]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
cmp dword [ebx + 0x5c], 0
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x814], esi
mov dword [ebp - 0x80c], edi
je 0x50e47c
lea eax, [ebp - 0x824]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x50e466
mov ecx, dword [ebp - 0x820]
mov eax, dword [ebp - 0x824]
mov dword [ebp - 0x820], ecx
jmp 0x50e48e
mov dword [ebp - 0x81c], 0xffffffff
mov dword [ebp - 0x820], 0xffffffff
jmp 0x50e494
mov eax, dword [ebp - 0x814]
mov dword [ebp - 0x820], eax
mov eax, dword [ebp - 0x818]
mov dword [ebp - 0x81c], eax
inc dword [ebx + 0x70]
test esi, esi
je 0x50e843
cmp dword [ebx + 0x60], 0
je 0x50e4b8
push dword [ebp + 0x14]
push edi
push str.Free
push 1
call sym.FLAMESLauncher.exe_MXExecValidate
add esp, 0x10
push dword [ebx + 0x88]
call sym.FLAMESLauncher.exe_MXGateLock
mov edx, esi
add esp, 4
sub edx, dword [0xa1c540]
mov dword [ebp - 0x810], edx
cmp word [edx], 0x19
mov eax, dword [edx + 0x60]
mov dword [ebp - 0x808], eax
jne 0x50e4eb
test eax, eax
jne 0x50e59d
push dword [ebp + 0x14]
push edi
push str.Free
push 1
push ebx
call fcn.0050ed00
add esp, 0x14
test eax, eax
je 0x50e591
push esi
push ebx
lea eax, [ebp - 0x404]
push str._s_memory_is_corrupted_at_0x_p.
push eax
call fcn.004f9620
add esp, 0x10
test edi, edi
je 0x50e582
cmp byte [edi], 0
je 0x50e582
push edi
call sym.FLAMESLauncher.exe_MXMemGetFileFromPath
push dword [ebp + 0x14]
push eax
lea eax, [ebp - 0x804]
push str._n_nThe_corruption_was_discovered_by_the_call_nto_Free_in__s_at_line__d.
push eax
call fcn.004f9620
lea edx, [ebp - 0x804]
add esp, 0x14
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x50e550
lea edi, [ebp - 0x404]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x50e560
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x80c]
mov esi, dword [ebp - 0x814]
lea eax, [ebp - 0x404]
push eax
call fcn.005202f0
add esp, 4
mov eax, dword [ebp - 0x808]
mov edx, dword [ebp - 0x810]
cmp byte [edx + 2], 0
je 0x50e639
push dword [ebx + 0x88]
call sym.FLAMESLauncher.exe_MXGateUnlock
push esi
push ebx
lea eax, [ebp - 0x404]
push str.Attempting_to_free__s_memory__nat_0x_p_that_is_already_free.
push eax
call fcn.004f9620
add esp, 0x14
test edi, edi
je 0x50e623
cmp byte [edi], 0
je 0x50e623
push edi
call sym.FLAMESLauncher.exe_MXMemGetFileFromPath
push dword [ebp + 0x14]
push eax
lea eax, [ebp - 0x804]
push str._n_nThe_erroneous_call_to_Free_is_nin__s_at_line__d.
push eax
call fcn.004f9620
lea edx, [ebp - 0x804]
add esp, 0x14
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x50e5f7
lea edi, [ebp - 0x404]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x50e607
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x80c]
lea eax, [ebp - 0x404]
push eax
call fcn.00520320
add esp, 4
xor esi, esi
jmp 0x50e848
cmp dword [eax + 0x10], ebx
je 0x50e6d4
push dword [ebx + 0x88]
call sym.FLAMESLauncher.exe_MXGateUnlock
push ebx
push esi
lea eax, [ebp - 0x404]
push str.Attempting_to_free_memory_at_0x_p_nthat_was_not_allocated_by__s.
push eax
call fcn.004f9620
add esp, 0x14
test edi, edi
je 0x50e6be
cmp byte [edi], 0
je 0x50e6be
push edi
call sym.FLAMESLauncher.exe_MXMemGetFileFromPath
push dword [ebp + 0x14]
push eax
lea eax, [ebp - 0x804]
push str._n_nThe_erroneous_call_to_Free_is_nin__s_at_line__d.
push eax
call fcn.004f9620
lea edx, [ebp - 0x804]
add esp, 0x14
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x50e692
lea edi, [ebp - 0x404]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x50e6a2
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x80c]
lea eax, [ebp - 0x404]
push eax
call fcn.00520320
add esp, 4
xor esi, esi
jmp 0x50e848
mov ecx, dword [eax]
cmp ecx, esi
ja 0x50e6e7
mov eax, dword [eax + 4]
add eax, ecx
cmp eax, esi
jae 0x50e771
push esi
push ebx
lea eax, [ebp - 0x404]
push str._s_memory_header_is_corrupted_at_0x_p.
push eax
call fcn.004f9620
add esp, 0x10
test edi, edi
je 0x50e75c
cmp byte [edi], 0
je 0x50e75c
push edi
call sym.FLAMESLauncher.exe_MXMemGetFileFromPath
push dword [ebp + 0x14]
push eax
lea eax, [ebp - 0x804]
push str._n_nThe_corruption_was_discovered_by_the_call_nto_Free_in__s_at_line__d.
push eax
call fcn.004f9620
lea edx, [ebp - 0x804]
add esp, 0x14
mov esi, edx
nop dword [eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x50e730
lea edi, [ebp - 0x404]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x50e740
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebp - 0x80c]
lea eax, [ebp - 0x404]
push eax
call fcn.005202f0
mov edx, dword [ebp - 0x810]
add esp, 4
mov esi, dword [ebp - 0x808]
mov ecx, dword [edx + 4]
mov byte [edx + 2], 1
add ecx, dword [0xa1c540]
mov eax, dword [esi + 4]
add ecx, edx
add eax, dword [esi]
cmp ecx, eax
sbb eax, eax
and eax, ecx
mov dword [ebp - 0x814], eax
je 0x50e7de
cmp byte [eax + 2], 0
je 0x50e7de
mov eax, dword [eax + 4]
add eax, dword [edx + 4]
push dword [ebp - 0x814]
add eax, dword [0xa1c540]
push esi
mov dword [edx + 4], eax
call fcn.0050f160
mov edx, dword [ebp - 0x810]
add esp, 8
mov eax, dword [esi + 4]
add eax, dword [esi]
mov ecx, dword [edx + 4]
add ecx, dword [0xa1c540]
add ecx, edx
cmp ecx, eax
sbb eax, eax
and eax, ecx
je 0x50e7de
mov dword [eax + 0x5c], edx
mov esi, dword [edx + 0x5c]
test esi, esi
je 0x50e828
cmp byte [esi + 2], 0
je 0x50e828
mov eax, dword [edx + 4]
add eax, dword [0xa1c540]
add dword [esi + 4], eax
mov edx, dword [ebp - 0x808]
mov ecx, dword [esi + 4]
add ecx, dword [0xa1c540]
add ecx, esi
mov eax, dword [edx + 4]
add eax, dword [edx]
cmp ecx, eax
sbb eax, eax
and eax, ecx
je 0x50e818
mov dword [eax + 0x5c], esi
push dword [ebx + 0x88]
call sym.FLAMESLauncher.exe_MXGateUnlock
add esp, 4
jmp 0x50e843
push edx
mov edx, dword [ebp - 0x808]
push edx
call fcn.0050ecc0
push dword [ebx + 0x88]
call sym.FLAMESLauncher.exe_MXGateUnlock
add esp, 0xc
mov esi, 2
cmp dword [ebx + 0x5c], 0
je 0x50e8ab
lea eax, [ebp - 0x818]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x50e893
mov ecx, dword [ebp - 0x818]
sub ecx, dword [ebp - 0x81c]
mov edx, dword [ebp - 0x814]
sbb edx, dword [ebp - 0x820]
js 0x50e88e
jg 0x50e87f
test ecx, ecx
je 0x50e88e
call fcn.0052cc20
mulsd xmm0, qword [0x5ed038]
jmp 0x50e89b
xorps xmm0, xmm0
jmp 0x50e89b
movsd xmm0, qword [0x5a4d88]
addsd xmm0, qword [ebx + 0x80]
movsd qword [ebx + 0x80], xmm0
cmp dword [ebx + 0x60], 0
je 0x50e8c4
push dword [ebp + 0x14]
push edi
push str.Free
push 1
call sym.FLAMESLauncher.exe_MXExecValidate
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0052bfb9
mov esp, ebp
pop ebp
ret