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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
mov eax, dword [0x5ed284]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
imul ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x14]
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x814], edi
mov dword [ebp - 0x808], esi
mov dword [ebp + 0xc], ebx
cmp dword [edi + 0x5c], 0
je 0x50da13
lea eax, [ebp - 0x820]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x50d9fd
mov ecx, dword [ebp - 0x81c]
mov eax, dword [ebp - 0x820]
mov dword [ebp - 0x81c], ecx
jmp 0x50da25
mov dword [ebp - 0x818], 0xffffffff
mov dword [ebp - 0x81c], 0xffffffff
jmp 0x50da2b
mov eax, dword [ebp - 0x808]
mov dword [ebp - 0x81c], eax
mov eax, dword [ebp - 0x80c]
mov dword [ebp - 0x818], eax
inc dword [edi + 0x6c]
test ebx, ebx
je 0x50de04
cmp dword [edi + 0x60], 0
je 0x50da4f
push dword [ebp + 0x18]
push esi
push str.Allocate
push 1
call sym.FLAMESLauncher.exe_MXExecValidate
add esp, 0x10
cmp ebx, 0x40
ja 0x50da5b
mov ebx, 0x40
jmp 0x50da89
cmp ebx, 0x80
ja 0x50da6a
mov ebx, 0x80
jmp 0x50da89
cmp ebx, 0xc0
ja 0x50da79
mov ebx, 0xc0
jmp 0x50da89
mov ecx, ebx
and ecx, 7
je 0x50da8c
mov eax, 8
sub eax, ecx
add ebx, eax
mov dword [ebp + 0xc], ebx
push dword [edi + 0x88]
call sym.FLAMESLauncher.exe_MXGateLock
add esp, 4
nop word [eax + eax]
mov edx, dword [edi + 0x64]
mov dword [ebp - 0x810], edx
test edx, edx
je 0x50dbb4
mov ebx, dword [edx + 8]
test ebx, ebx
je 0x50dba0
nop dword [eax]
cmp word [ebx], 0x19
jne 0x50dad9
mov ecx, dword [edx]
cmp ecx, ebx
ja 0x50dad9
mov eax, dword [edx + 4]
add eax, ecx
cmp eax, ebx
jae 0x50db87
push dword [ebp + 0x18]
push esi
push str.Allocate
push 1
push edi
call fcn.0050ed00
add esp, 0x14
test eax, eax
je 0x50db81
push ebx
push edi
lea eax, [ebp - 0x404]
push str._s_memory_is_corrupted_at_0x_p.
push eax
call fcn.004f9620
add esp, 0x10
test esi, esi
je 0x50db72
cmp byte [esi], 0
je 0x50db72
push esi
call sym.FLAMESLauncher.exe_MXMemGetFileFromPath
push dword [ebp + 0x18]
push eax
lea eax, [ebp - 0x804]
push str._n_nThe_corruption_was_discovered_by_the_call_nto_Allocate_in__s_at_line__d.
push eax
call fcn.004f9620
lea edx, [ebp - 0x804]
add esp, 0x14
mov esi, edx
nop word [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x50db40
lea edi, [ebp - 0x404]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x50db50
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 esi, dword [ebp - 0x808]
mov edi, dword [ebp - 0x814]
lea eax, [ebp - 0x404]
push eax
call fcn.005202f0
add esp, 4
mov edx, dword [ebp - 0x810]
mov ecx, dword [ebx + 4]
mov eax, dword [ebp + 0xc]
cmp ecx, eax
jae 0x50dcac
mov ebx, dword [ebx + 0x54]
test ebx, ebx
jne 0x50dac0
mov edx, dword [edx + 0xc]
mov dword [ebp - 0x810], edx
test edx, edx
jne 0x50dab1
mov ebx, dword [ebp + 0xc]
mov ecx, dword [0xa1c54c]
mov eax, 0x100000
sub eax, ecx
lea edi, [ecx + ebx*4]
cmp eax, ebx
jb 0x50dbcd
mov edi, 0x100000
push edi
push 1
call sym.FLAMESLauncher.exe_MXExecAllocate
mov esi, eax
add esp, 8
mov eax, 0x19
mov word [esi], ax
mov byte [esi + 2], 0
mov eax, dword [0xa1c544]
mov dword [esi + 4], eax
mov dword [esi + 0x5c], 0
mov dword [esi + 0x54], 0
mov dword [esi + 0x58], 0
mov byte [esi + 3], 0
movups xmm0, xmmword [str._internal_allocator_memory_block_]
movups xmmword [esi + 0x10], xmm0
movups xmm0, xmmword [0x5a4efc]
movups xmmword [esi + 0x20], xmm0
movzx eax, word [0x5a4f0c]
mov word [esi + 0x30], ax
mov edx, dword [0xa1c540]
mov dword [edx + esi + 4], edi
add edx, esi
mov edi, dword [ebp - 0x814]
mov dword [edx], esi
mov eax, dword [edi + 0x64]
mov dword [edx + 0xc], eax
mov eax, 0x19
mov dword [edi + 0x64], edx
mov ecx, dword [0xa1c544]
add ecx, edx
mov word [ecx], ax
mov byte [ecx + 2], 1
mov eax, dword [edx + 4]
sub eax, dword [0xa1c54c]
mov dword [ecx + 0x5c], esi
mov esi, dword [ebp - 0x808]
mov dword [ecx + 4], eax
mov dword [ecx + 0x54], 0
mov dword [ecx + 0x58], 0
mov byte [ecx + 3], 0
movups xmm0, xmmword [str._internal_allocator_memory_block_]
movups xmmword [ecx + 0x10], xmm0
movups xmm0, xmmword [0x5a4efc]
movups xmmword [ecx + 0x20], xmm0
movzx eax, word [0x5a4f0c]
mov word [ecx + 0x30], ax
mov dword [edx + 8], ecx
mov dword [edx + 0x10], edi
jmp 0x50daa0
mov edi, dword [0xa1c540]
add eax, edi
cmp ecx, eax
jbe 0x50dd1c
mov eax, dword [ebp + 0xc]
sub ecx, edi
sub ecx, eax
cmp ecx, 0xc0
jb 0x50dd1c
add edi, ebx
add edi, eax
xor eax, eax
mov dword [edi + 4], ecx
mov dword [edi + 0x5c], ebx
mov dword [edi], 0x10019
mov dword [edi + 0x58], 0
mov byte [edi + 0x10], 0
mov word [edi + 0x50], ax
mov eax, dword [edx + 8]
mov dword [edi + 0x54], eax
test eax, eax
je 0x50dcf8
mov eax, dword [edx + 8]
mov dword [eax + 0x58], edi
mov eax, dword [edx + 4]
add eax, dword [edx]
mov dword [edx + 8], edi
mov ecx, dword [ebx + 4]
add ecx, dword [0xa1c540]
add ecx, ebx
cmp ecx, eax
sbb eax, eax
and eax, ecx
je 0x50dd16
mov dword [eax + 0x5c], edi
mov eax, dword [ebp + 0xc]
mov dword [ebx + 4], eax
mov ecx, dword [ebx + 0x58]
mov eax, dword [ebx + 0x54]
test ecx, ecx
jne 0x50dd32
mov dword [edx + 8], eax
test eax, eax
je 0x50dd3f
mov dword [eax + 0x58], ecx
jmp 0x50dd3f
mov dword [ecx + 0x54], eax
mov eax, dword [ebx + 0x54]
test eax, eax
je 0x50dd3f
mov dword [eax + 0x58], ecx
mov edi, dword [ebp - 0x814]
mov dword [ebx + 0x54], 0
mov dword [ebx + 0x58], 0
mov byte [ebx + 2], 0
mov dword [ebx + 0x60], edx
mov eax, dword [edi + 0x6c]
mov dword [ebx + 8], eax
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0xc], eax
test esi, esi
je 0x50ddc7
cmp byte [esi], 0
je 0x50ddc7
push esi
call sym.FLAMESLauncher.exe_MXMemGetFileFromPath
add esp, 4
mov edx, eax
lea ecx, [eax + 1]
mov dword [ebp - 0x808], ecx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x50dd83
sub eax, dword [ebp - 0x808]
lea ecx, [ebx + 0x10]
cmp eax, 0x40
jae 0x50ddaf
sub ecx, edx
nop word [eax + eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x50dda0
jmp 0x50ddc0
push 0x3f
push edx
push ecx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov byte [ebx + 0x4f], 0
mov eax, dword [ebp + 0x18]
mov word [ebx + 0x50], ax
mov eax, dword [0xa1c540]
push dword [edi + 0x88]
add eax, ebx
mov dword [ebp - 0x808], eax
call sym.FLAMESLauncher.exe_MXGateUnlock
add esp, 4
test byte [edi + 0x68], 2
je 0x50ddfe
push dword [ebx + 4]
mov ebx, dword [ebp - 0x808]
push 0
push ebx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
jmp 0x50de04
mov ebx, dword [ebp - 0x808]
cmp dword [edi + 0x5c], 0
je 0x50de61
lea eax, [ebp - 0x80c]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
test eax, eax
je 0x50de4f
mov ecx, dword [ebp - 0x80c]
sub ecx, dword [ebp - 0x818]
mov edx, dword [ebp - 0x808]
sbb edx, dword [ebp - 0x81c]
js 0x50de4a
jg 0x50de3b
test ecx, ecx
je 0x50de4a
call fcn.0052cc20
mulsd xmm0, qword [0x5ed038]
jmp 0x50de57
xorps xmm0, xmm0
jmp 0x50de57
movsd xmm0, qword [0x5a4d88]
addsd xmm0, qword [edi + 0x78]
movsd qword [edi + 0x78], xmm0
cmp dword [edi + 0x60], 0
je 0x50de7a
push dword [ebp + 0x18]
push esi
push str.Allocate
push 1
call sym.FLAMESLauncher.exe_MXExecValidate
add esp, 0x10
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0052bfb9
mov esp, ebp
pop ebp
ret