Function at 0x48e590
Capabilities:
Clear file content
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4adec8
mov eax, dword fs:[0]
push eax
sub esp, 0x38
push ebx
push esi
push edi
mov eax, dword [0x4e1370]
xor eax, esp
push eax
lea eax, [esp + 0x48]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x24], edi
lea eax, [edi + 0x20]
push eax
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor esi, esi
mov dword [esp + 0x50], esi
mov ebx, dword [edi + 0x38]
cmp dword [ebx + 0x18], 1
mov dword [esp + 0x28], ebx
mov byte [esp + 0x13], 0
jne 0x48e5ed
mov byte [esp + 0x13], 1
mov ecx, dword [edi + 0x44]
mov eax, dword [edi + 0x40]
push esi
add eax, ecx
push esi
mov dword [esp + 0x28], ecx
xor ecx, ecx
push ecx
push eax
mov eax, dword [edi + 0x48]
push eax
mov dword [edi + 0x44], esi
mov dword [esp + 0x4c], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x48e622
mov ecx, dword [edi + 0x48]
push ecx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x48e654
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x18], eax
cmp eax, esi
je 0x48e654
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push esi
push esi
xor ecx, ecx
xor eax, eax
push ecx
push eax
mov eax, dword [edi + 0x48]
push eax
mov dword [esp + 0x4c], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x48e6a0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x1c], eax
cmp eax, esi
je 0x48e6a0
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
cmp byte [esp + 0x13], 0
jne 0x48e6aa
inc dword [ebx + 0x18]
lea esi, [ebx + 0x10]
call fcn.0048e030
mov edx, dword [esp + 0x20]
xor eax, eax
mov dword [ebx + 0x20], edx
xor ecx, ecx
lea ecx, [ecx]
xor eax, dword [ebx + ecx*4]
inc ecx
cmp ecx, 0x7f
jb 0x48e6c0
cmp eax, 0xffffffff
jne 0x48e6d5
mov eax, 0xfffffffe
jmp 0x48e6de
test eax, eax
jne 0x48e6de
mov eax, 1
mov dword [ebx + 0x1fc], eax
lea eax, [esp + 0x18]
push eax
mov eax, dword [edi + 0x40]
lea ecx, [esp + 0x24]
push ecx
push edi
mov ecx, ebx
mov dword [esp + 0x24], 0
call fcn.0048ec60
mov esi, dword [eax]
test esi, esi
jne 0x48e85a
cmp byte [esp + 0x13], 0
je 0x48e72f
cmp byte [ebp + 8], 0
je 0x48e725
lea esi, [esp + 0x28]
mov eax, edi
call fcn.0048ed30
mov esi, dword [eax]
mov eax, dword [esp + 0x14]
push eax
jmp 0x48e85f
mov ecx, dword [edi + 0x18]
mov ecx, dword [ecx]
mov eax, dword [edi + 4]
lea esi, [edi + 4]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], ecx
mov edx, dword [esi + 0x14]
mov ecx, dword [esi]
mov dword [esp + 0x38], edx
test eax, eax
je 0x48e757
cmp eax, ecx
je 0x48e760
call fcn.00490387
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x38]
cmp dword [esp + 0x30], ecx
je 0x48e7f0
test eax, eax
jne 0x48e7ec
call fcn.00490387
xor eax, eax
mov edx, dword [esp + 0x30]
cmp edx, dword [eax + 0x14]
jne 0x48e787
call fcn.00490387
mov eax, dword [esp + 0x30]
mov esi, dword [eax + 8]
mov eax, dword [esi + 4]
sub eax, dword [esi + 8]
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x24]
push edx
sub eax, 0xc
lea ecx, [esi + 0xc]
push edi
call fcn.0048ec60
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x1c]
push eax
push ecx
lea ebx, [esp + 0x44]
call fcn.0048ed50
mov edx, dword [eax]
mov eax, dword [eax + 4]
push esi
mov dword [esp + 0x30], edx
mov dword [esp + 0x34], eax
call fcn.00490de7
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x20]
mov eax, dword [esp + 0x30]
add esp, 4
jmp 0x48e746
mov eax, dword [eax]
jmp 0x48e779
call fcn.0048edd0
inc dword [ebx + 0x1c]
mov edx, ebx
call fcn.0048ebc0
push 0
lea esi, [esp + 0x2c]
mov ecx, edi
mov dword [ebx + 0x1fc], eax
call fcn.0048ecf0
mov esi, dword [eax]
test esi, esi
je 0x48e81f
mov ecx, dword [esp + 0x14]
push ecx
jmp 0x48e85f
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x2c]
push eax
push edi
mov eax, 0x200
mov ecx, ebx
call fcn.0048ec60
mov esi, dword [eax]
test esi, esi
jne 0x48e818
cmp byte [ebp + 8], 0
je 0x48e84f
lea esi, [esp + 0x28]
mov eax, edi
call fcn.0048ed30
mov esi, dword [eax]
mov eax, 1
mov dword [ebx + 0x18], eax
mov dword [ebx + 0x1c], eax
mov edx, dword [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, esi
mov ecx, dword [esp + 0x48]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4