Function at 0x506f00
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x768
mov eax, dword [0x5ed284]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
mov dword [ebp - 0x75c], eax
push esi
push edi
test ebx, ebx
je 0x507003
cmp byte [ebx], al
je 0x507003
lea eax, [ebp - 0x294]
push eax
push ebx
call sym.FLAMESLauncher.exe_FOSUtilityGetFullPath
lea eax, [ebp - 0x294]
push 0
push eax
call sym.FLAMESLauncher.exe_FFileManagerGetDatasetsFromExportFile
add esp, 0x10
test eax, eax
je 0x507003
mov eax, dword [0xa1c670]
push dword [eax + 0x140]
call sym.FLAMESLauncher.exe_FRecordArrayGetCount
add esp, 4
cmp eax, 1
jge 0x506f85
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052bfb9
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x18c]
push eax
push ebx
call sym.FLAMESLauncher.exe_FOSUtilityGetDirectoryPathFromPath
call sym.FLAMESLauncher.exe_FOSUtilityGetTimeOfDay
fstp qword [esp]
lea eax, [ebp - 0x39c]
push str.__f.imptmp
push eax
call fcn.004f9620
lea edx, [ebp - 0x39c]
add esp, 0x10
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x506fb6
lea edi, [ebp - 0x18c]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x506fc6
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push 0x72
rep movsb byte es:[edi], byte [esi]
push ebx
call sym.FLAMESLauncher.exe_FDBOpenFile
mov edi, eax
add esp, 8
mov dword [ebp - 0x758], edi
test edi, edi
jne 0x507016
push ebx
push str.Error:_The_file___s__could_not_be_opened_for_reading._n
push eax
push eax
call sym.FLAMESLauncher.exe_FMHPrintError
add esp, 0x10
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052bfb9
mov esp, ebp
pop ebp
ret
push edi
call sym.FLAMESLauncher.exe_FDBGetStream
mov dword [ebp - 0x764], eax
call sym.FLAMESLauncher.exe_FMHOpenBuffer
push str.EXPORT_DATASET
push edi
call sym.FLAMESLauncher.exe_FDBSkipRecord
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x50704b
push str.FADMINEXPDS
push edi
call sym.FLAMESLauncher.exe_FDBSkipRecord
add esp, 8
mov esi, eax
call sym.FLAMESLauncher.exe_FMHCloseBuffer
call sym.FLAMESLauncher.exe_FMHResetBuffer
test esi, esi
jne 0x507073
push ebx
push str.Error:_Could_not_skip_dataset_records_in_the_export_file___s_.
push esi
push esi
call sym.FLAMESLauncher.exe_FMHPrintError
add esp, 0x10
mov dword [ebp - 0x75c], 1
mov eax, dword [0xa1c670]
mov byte [ebp - 0x44], 0
push dword [eax + 0x140]
call sym.FLAMESLauncher.exe_FRecordArrayGetFirst
mov ebx, eax
add esp, 4
mov esi, 1
test ebx, ebx
je 0x507577
nop dword [eax]
xor eax, eax
lea edi, [ebp - 0x630]
mov ecx, 0x21
mov esi, ebx
mov dword [ebp - 0x760], eax
rep movsd dword es:[edi], dword [esi]
cmp dword [0x5f6228], eax
je 0x50711e
mov eax, dword [0xa1c670]
cmp dword [eax + 0x13c], 0
jne 0x5070db
push 0
call sym.FLAMESLauncher.exe_FFileManagerEstablishConnection
add esp, 4
test eax, eax
je 0x5070ee
lea eax, [ebp - 0x5f0]
push eax
call sym.FLAMESLauncher.exe_FFileManagerGetUserByName
add esp, 4
test eax, eax
jne 0x507141
cmp dword [0x5f6228], 0
je 0x50711e
lea eax, [ebp - 0x5f0]
push eax
mov eax, dword [0xa1c670]
push sym.FLAMESLauncher.exe_FCompareText
push dword [eax + 0x138]
call sym.FLAMESLauncher.exe_FRecordArrayGetFirstByQuery
add esp, 0xc
test eax, eax
jne 0x50754e
lea eax, [ebp - 0x5ac]
push eax
lea eax, [ebp - 0x5f0]
push 0x5b7db5
push eax
call sym.FLAMESLauncher.exe_FFileManagerCreateUser
add esp, 0xc
test eax, eax
je 0x50754e
lea ecx, [ebp - 0x5f0]
lea eax, [ebp - 0x44]
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x507170
test dl, dl
je 0x50716c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x507170
add eax, 2
add ecx, 2
test dl, dl
jne 0x507150
xor eax, eax
jmp 0x507175
sbb eax, eax
or eax, 1
test eax, eax
je 0x5072ed
cmp byte [ebp - 0x44], 0
je 0x50718f
lea eax, [ebp - 0x44]
push eax
call sym.FLAMESLauncher.exe_FFileManagerUnlockUser
add esp, 4
cmp dword [ebp + 0xc], 0
je 0x5072b5
lea eax, [ebp - 0x5f0]
push eax
call sym.FLAMESLauncher.exe_FFileManagerGetUserByName
mov esi, eax
add esp, 4
test esi, esi
je 0x50754e
lea eax, [ebp - 0x5f0]
push 2
push eax
call sym.FLAMESLauncher.exe_FFileManagerLockUser
add esp, 8
test eax, eax
jne 0x5071da
cmp dword [esi + 0x260], eax
jne 0x5071da
call sym.FLAMESLauncher.exe_FFileManagerCreateGrantArray
mov dword [esi + 0x260], eax
push 0x232
push str.FFileManagerAddGrantToUser
push 0x5a21cc
lea eax, [ebp - 0x684]
push 0x40
push eax
call sym.FLAMESLauncher.exe_FStringCopyWithTag
movaps xmm0, xmmword [0x5a4090]
lea eax, [ebp - 0x684]
push eax
mov dword [ebp - 0x634], 1
movups xmmword [ebp - 0x644], xmm0
push sym.FLAMESLauncher.exe_FCompareText
push dword [esi + 0x260]
call sym.FLAMESLauncher.exe_FRecordArrayGetFirstByQuery
mov ecx, eax
add esp, 0x20
test ecx, ecx
je 0x507270
movups xmm0, xmmword [ebp - 0x684]
movups xmmword [ecx], xmm0
movups xmm0, xmmword [ebp - 0x674]
movups xmmword [ecx + 0x10], xmm0
movups xmm0, xmmword [ebp - 0x664]
movups xmmword [ecx + 0x20], xmm0
movups xmm0, xmmword [ebp - 0x654]
movups xmmword [ecx + 0x30], xmm0
movups xmm0, xmmword [ebp - 0x644]
movups xmmword [ecx + 0x40], xmm0
mov eax, dword [ebp - 0x634]
mov dword [ecx + 0x50], eax
jmp 0x50728f
push 0x246
push str.FFileManagerAddGrantToUser
lea eax, [ebp - 0x684]
push eax
push dword [esi + 0x260]
call sym.FLAMESLauncher.exe_FRecordArrayAddRecordWithTag
add esp, 0x10
lea eax, [ebp - 0x5f0]
push eax
call sym.FLAMESLauncher.exe_FFileManagerWriteDatasetMapFile
add esp, 4
test eax, eax
lea eax, [ebp - 0x5f0]
push eax
je 0x507546
call sym.FLAMESLauncher.exe_FFileManagerUnlockUser
add esp, 4
lea eax, [ebp - 0x5f0]
push 2
push eax
call sym.FLAMESLauncher.exe_FFileManagerLockUser
add esp, 8
test eax, eax
je 0x507003
push 0xf70
push 0x5a3164
lea eax, [ebp - 0x5f0]
push eax
lea eax, [ebp - 0x44]
push 0x40
push eax
call sym.FLAMESLauncher.exe_FStringCopyWithTag
add esp, 0x14
push dword [ebp - 0x5b0]
lea eax, [ebp - 0x5f0]
push eax
lea eax, [ebp - 0x630]
push eax
call sym.FLAMESLauncher.exe_FFileManagerDatasetExists
mov edi, dword [ebp - 0x758]
test eax, eax
mov eax, dword [ebp - 0x760]
mov esi, 1
cmove eax, esi
mov dword [ebp - 0x760], eax
lea eax, [ebp - 0x768]
push eax
lea eax, [ebp - 0x84]
push eax
push edi
call sym.FLAMESLauncher.exe_FDBReadProem
add esp, 0x18
test eax, eax
je 0x5073f5
mov esi, dword [ebp - 0x764]
cmp eax, 0xffffffff
je 0x5073f0
lea ecx, [ebp - 0x84]
mov eax, str.EXPORT_DATASET_FILE
nop dword [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x507380
test dl, dl
je 0x50737c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x507380
add eax, 2
add ecx, 2
test dl, dl
jne 0x507360
xor eax, eax
jmp 0x507385
sbb eax, eax
or eax, 1
test eax, eax
jne 0x5073f0
lea eax, [ebp - 0x754]
push eax
push edi
call sym.FLAMESLauncher.exe_FDBRead
add esp, 8
test eax, eax
je 0x50755d
mov eax, dword [ebp - 0x690]
cmp eax, dword [ebx + 0xc4]
lea eax, [ebp - 0x754]
push eax
push edi
lea eax, [ebp - 0x18c]
je 0x5073ff
push 1
push eax
push esi
call sym.FLAMESLauncher.exe_FFileManagerExtractFileFromExportFile
add esp, 0x14
test eax, eax
je 0x50756e
lea eax, [ebp - 0x768]
push eax
lea eax, [ebp - 0x84]
push eax
push edi
call sym.FLAMESLauncher.exe_FDBReadProem
add esp, 0xc
test eax, eax
jne 0x507347
mov esi, 1
mov ebx, 1
jmp 0x507503
push 0
push eax
push esi
call sym.FLAMESLauncher.exe_FFileManagerExtractFileFromExportFile
add esp, 0x14
test eax, eax
je 0x50756e
cmp dword [ebp - 0x760], 0
je 0x50743d
push 0
lea eax, [ebp - 0x18c]
push eax
lea eax, [ebp - 0x5f0]
push eax
lea eax, [ebp - 0x630]
push eax
call sym.FLAMESLauncher.exe_FFileManagerAddDatasetToUser
add esp, 0x10
jmp 0x5074b6
lea eax, [ebp - 0x630]
push eax
call sym.FLAMESLauncher.exe_FFileManagerGetDatasetPath
mov esi, eax
add esp, 4
test esi, esi
je 0x50756e
cmp dword [0x5f6228], 0
je 0x507487
mov ecx, dword [0xa1c670]
mov ecx, dword [ecx + 0x13c]
test ecx, ecx
je 0x507487
push ecx
call sym.FLAMESLauncher.exe_FDatabaseConnectionGetType
add esp, 4
cmp eax, 1
jne 0x507487
mov eax, dword [0xa1c670]
add eax, 0x24
jmp 0x507489
xor eax, eax
push esi
push 0x5c
push eax
lea eax, [ebp - 0x4a4]
push str._s_c_s
push eax
call fcn.004f9620
push 1
lea eax, [ebp - 0x4a4]
push eax
lea eax, [ebp - 0x18c]
push eax
call sym.FLAMESLauncher.exe_FOSUtilityCopyFile
add esp, 0x20
test eax, eax
je 0x50756e
mov ebx, dword [ebp - 0x75c]
test ebx, ebx
jne 0x5074fe
lea eax, [ebp - 0x5f0]
push eax
call sym.FLAMESLauncher.exe_FFileManagerWriteDatasetMapFile
add esp, 4
test eax, eax
je 0x5074fe
mov eax, dword [0xa1c670]
push dword [eax + 0x140]
call sym.FLAMESLauncher.exe_FRecordArrayGetNext
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x5070a0
mov ebx, dword [ebp - 0x75c]
mov esi, 1
cmp byte [ebp - 0x44], 0
je 0x507515
lea eax, [ebp - 0x44]
push eax
call sym.FLAMESLauncher.exe_FFileManagerUnlockUser
add esp, 4
push edi
call sym.FLAMESLauncher.exe_FDBClose
lea ecx, [ebp - 0x18c]
push ecx
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 8
test ebx, ebx
jne 0x507003
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
call sym.FLAMESLauncher.exe_FFileManagerUnlockUser
add esp, 4
mov edi, dword [ebp - 0x758]
mov ebx, 1
mov esi, ebx
jmp 0x507503
push str.Error:_failed_to_read_record_from_the_export_file._n
push 0
push 0
call sym.FLAMESLauncher.exe_FMHAnnounceError
add esp, 0xc
mov ebx, 1
mov esi, ebx
jmp 0x507503
mov ebx, dword [ebp - 0x75c]
jmp 0x507503