Function at 0x504de0
Capabilities:
Delete file
Read file on windows
Read file via mapping

Disassembly:
push 0xffffffffffffffff
push 0x56c0c0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [esp + 0x50]
mov dword [esp + 0x48], 0
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x504fcb
push 0x5c5c24
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x504fcb
mov edi, dword [sym.imp.MSVCRT.dll_ftell]
push esi
call edi
push 2
push 0
push esi
mov ebp, eax
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
call edi
push 0
push ebp
push esi
mov ebx, eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0x20
test ebx, ebx
je 0x504fcb
lea edi, [ebx + 1]
push edi
call dword [sym.imp.MSVCRT.dll_malloc]
mov ecx, edi
mov ebp, eax
mov edx, ecx
xor eax, eax
mov edi, ebp
push esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push ebx
and ecx, 3
push 1
rep stosb byte es:[edi], al
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esp + 0x68]
add esp, 0x18
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea ecx, [esp + 0x20]
call fcn.00539870
push ebp
lea ecx, [esp + 0x24]
mov byte [esp + 0x4c], 1
call fcn.00539f10
test al, al
je 0x504ec8
mov ebx, dword [str.StormPlayer_PrcoShareVideoInfo_83573C4D_4946_4809_9871_3A2CA67CCC77]
mov dword [esp + 0x14], 0x858
jmp 0x504ee8
push ebp
lea ecx, [esp + 0x20]
call fcn.0053bba0
test al, al
je 0x504fbd
mov ebx, dword [str.StormPlayer_PrcoShareAlbumInfo_DC18E5F3_3DF9_4d2c_9A55_D101322B8859]
mov dword [esp + 0x14], 0x85c
mov ecx, dword [str.StormPlayer_PrcoShareHwndName_gbhgferereeEE98721eha]
mov dword [esp + 0x10], 0
push ecx
push 0
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov esi, eax
test esi, esi
je 0x504faf
mov edi, dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push 0
push 0
push 0
push 4
push esi
call edi
test eax, eax
je 0x504f2d
mov edx, dword [eax]
push eax
mov dword [esp + 0x14], edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x504faf
mov esi, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
push ebp
call esi
inc eax
push eax
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov ebx, eax
test ebx, ebx
je 0x504faf
push 0
push 0
push 0
push 6
push ebx
call edi
mov edi, eax
test edi, edi
mov dword [esp + 0x18], edi
je 0x504faf
push ebp
call esi
mov ecx, eax
mov esi, ebp
inc ecx
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov edx, dword [esp + 0x54]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
push ebx
push 0x504dd0
push 1
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_SendMessageCallbackA]
test ebp, ebp
je 0x504fbd
push ebp
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
lea ecx, [esp + 0x20]
mov byte [esp + 0x48], 0
call fcn.00539930
lea ecx, [esp + 0x50]
mov dword [esp + 0x48], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x40]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x3c
ret 8