Function at 0x50dbde
Capabilities:
Clear file content
Get file size

Disassembly:
push ebp
push edi
push esi
push ebx
mov ebx, ecx
sub esp, 0x5c
test byte [ecx + 0x20], 4
mov edi, dword [esp + 0x70]
mov ebp, dword [esp + 0x74]
mov esi, dword [esp + 0x78]
je 0x50dc17
call fcn.0050d5ae
mov eax, dword [0x855c44]
lea ecx, [eax - 1]
mov eax, ecx
and ecx, edi
cdq
mov eax, edx
and eax, ebp
or eax, ecx
jne 0x50dd79
lea eax, [esp + 0x48]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
push edx
push edx
je 0x50dc89
cmp ebp, dword [esp + 0x4c]
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], ebp
jne 0x50dc45
cmp edi, dword [esp + 0x48]
je 0x50dca0
lea eax, [esp + 0x40]
mov edx, dword [esp + 0x44]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x40]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
sub esp, 0x14
test eax, eax
je 0x50dc89
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
push edx
jne 0x50dca0
call fcn.004db479
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 4], ebx
mov dword [esi], eax
jmp 0x50ddc9
test byte [ebx + 0x20], 8
jne 0x50dd72
cmp dword [0x855c4c], 0
jne 0x50dcef
cmp byte [0x855c49], 0
jne 0x50dcef
mov dword [esp], 0x7389c8
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
push ecx
je 0x50dce8
mov dword [esp + 4], str.GetCompressedFileSizeW
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x855c4c], eax
push edx
push edx
jmp 0x50dcef
mov byte [0x855c49], 1
mov eax, dword [0x855c4c]
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 0
test eax, eax
je 0x50dd53
lea edx, [esp + 0x3c]
mov dword [esp + 0x3c], 0
mov dword [esp + 4], edx
mov edx, dword [ebx + 8]
mov dword [esp], edx
call eax
push ecx
push ecx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x40], eax
inc eax
mov dword [esp + 0x44], edx
jne 0x50dd53
call fcn.004db479
mov dword [esp + 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0x2c]
mov dword [esi], eax
mov dword [esi + 4], edx
xor edx, edx
test eax, eax
jne 0x50de50
cmp ebp, dword [esp + 0x44]
jne 0x50dd5f
cmp edi, dword [esp + 0x40]
je 0x50dd72
mov dword [esp + 4], edi
mov dword [esp + 8], ebp
mov eax, dword [ebx + 4]
mov dword [esp], eax
call fcn.0050db69
mov dl, 1
jmp 0x50de50
cmp dword [0x855c54], 0
jne 0x50ddbf
xor edx, edx
cmp byte [0x855c50], 0
jne 0x50de50
mov dword [esp], str.ntdll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
push edx
je 0x50ddd0
mov dword [esp + 4], str.NtSetInformationFile
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
push ecx
mov dword [0x855c54], eax
push ecx
je 0x50ddd0
mov dl, byte [0x855c50]
test dl, dl
je 0x50ddd9
xor edx, edx
jmp 0x50de50
mov byte [0x855c50], 1
jmp 0x50ddbf
mov eax, dword [0x855c54]
test eax, eax
je 0x50de50
lea ecx, [esp + 0x40]
mov dword [esp + 0x10], 0x14
mov dword [esp + 0xc], 8
mov byte [esp + 0x2c], dl
mov dword [esp + 0x40], edi
mov dword [esp + 8], ecx
lea ecx, [esp + 0x48]
mov dword [esp + 0x44], ebp
mov dword [esp + 4], ecx
mov ecx, dword [ebx + 4]
mov dword [esp], ecx
call eax
sub esp, 0x14
test eax, eax
jns 0x50de2d
call fcn.004db479
mov dword [esi], 0xffffffff
mov dword [esi + 4], eax
jmp 0x50de4c
test byte [ebx + 0x20], 8
mov dl, 1
jne 0x50de50
mov dword [esp + 4], edi
mov dword [esp + 8], ebp
mov eax, dword [ebx + 4]
mov byte [esp + 0x2c], dl
mov dword [esp], eax
call fcn.0050db69
mov dl, byte [esp + 0x2c]
add esp, 0x5c
mov al, dl
pop ebx
pop esi
pop edi
pop ebp
ret 0xc