Function at 0x1005825b
Capabilities:
Delete file
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1007d02f
mov eax, dword fs:[0]
push eax
mov eax, 0x20b0
call fcn.1006a730
mov eax, dword [0x10099060]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push dword [ebp + 0x10]
mov dword [ebp - 0x2060], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2064], eax
lea eax, [ebp - 0x2080]
push eax
call fcn.10059b35
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp - 0x2070]
sub eax, dword [ebp - 0x2074]
test eax, 0xffffffe0
jg 0x100582ed
lea esi, [ebp - 0x2080]
call fcn.10059ada
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.1005ebcb
leave
ret
or dword [ebp - 0x2050], 0xffffffff
mov dword [ebp - 0x2090], 1
mov dword [ebp - 0x208c], 5
mov dword [ebp - 0x2088], 3
mov dword [ebp - 0x2084], 7
mov byte [ebp - 4], 1
xor edi, edi
push ebx
push 0x8000000
push 3
push ebx
push dword [ebp + edi*4 - 0x2090]
push 0x80000000
push dword [ebp - 0x2060]
call dword [0x100a17a8]
push eax
lea esi, [ebp - 0x2050]
call fcn.1005770c
mov esi, dword [ebp - 0x2050]
cmp esi, ebx
je 0x1005835e
cmp esi, 0xffffffff
jne 0x10058364
inc edi
cmp edi, 4
jb 0x10058322
cmp esi, ebx
je 0x1005836d
cmp esi, 0xffffffff
jne 0x1005837d
lea ecx, [ebp - 0x2050]
call fcn.10001340
jmp 0x100582c6
push 0xfff
lea eax, [ebp - 0x1013]
push ebx
push eax
mov byte [ebp - 0x1014], bl
call fcn.10062cf0
add esp, 0xc
push ebx
push esi
lea eax, [ebp - 0x1014]
call fcn.1005790f
pop ecx
pop ecx
test eax, eax
je 0x1005836d
cmp dword [ebp - 0x100c], 2
jne 0x1005836d
mov dword [ebp - 0x2058], ebx
cmp dword [ebp - 0xe74], ebx
jbe 0x1005836d
lea edi, [ebp - 0xe70]
push 0xa
push edi
lea esi, [ebp - 0x209c]
call fcn.1003cea8
push ebx
push eax
lea eax, [ebp - 0x20bc]
push eax
mov byte [ebp - 4], 2
call fcn.1005078b
push eax
lea eax, [ebp - 0x2080]
push eax
mov byte [ebp - 4], 3
call fcn.10059bfb
lea ecx, [ebp - 0x20bc]
mov byte [ebp - 0x2059], al
call fcn.100077c0
mov ecx, esi
mov byte [ebp - 4], 1
call fcn.100077c0
cmp byte [ebp - 0x2059], bl
jne 0x10058439
inc dword [ebp - 0x2058]
mov eax, dword [ebp - 0x2058]
add edi, 0xa
cmp eax, dword [ebp - 0xe74]
jb 0x100583c8
jmp 0x1005836d
lea eax, [ebp - 0xbf0]
push eax
lea ecx, [ebp - 0x209c]
call fcn.10007750
lea eax, [ebp - 0x209c]
push eax
lea eax, [ebp - 0x2030]
push eax
mov byte [ebp - 4], 4
call fcn.100578e0
pop ecx
pop ecx
lea ecx, [ebp - 0x209c]
mov byte [ebp - 4], 6
call fcn.100077c0
push ebx
push 0x8000080
push 2
push ebx
push 1
push 0x40000000
push dword [ebp - 0x2064]
call dword [0x100a17a8]
mov esi, eax
mov dword [ebp - 0x2058], esi
mov byte [ebp - 4], 7
cmp esi, ebx
je 0x100584a4
cmp esi, 0xffffffff
jne 0x100584bf
lea ecx, [ebp - 0x2058]
call fcn.10001340
lea ecx, [ebp - 0x2030]
call fcn.100077c0
jmp 0x1005836d
push ebx
push ebx
mov edi, 0x1000
push edi
push dword [ebp - 0x2050]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [ebp - 0x2018], 0x10
mov eax, dword [ebp - 0x202c]
jae 0x100584e8
lea eax, [ebp - 0x202c]
push dword [ebp - 0x201c]
lea ebx, [ebp - 0x204c]
push eax
call fcn.10057a6c
xor ebx, ebx
push 0xfff
lea eax, [ebp - 0x2013]
push ebx
push eax
mov byte [ebp - 0x2014], bl
call fcn.10062cf0
mov dword [ebp - 0x2054], ebx
jmp 0x100585e7
cmp dword [ebp - 0x2054], ebx
ja 0x10058551
push ebx
lea eax, [ebp - 0xb68]
push eax
push dword [ebp - 0xb6c]
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor ebx, ebx
inc ebx
jmp 0x10058638
inc dword [ebp - 0x2054]
test byte [ebp - 0x2054], 0xf
jne 0x1005854b
test dword [ebp - 0x2054], 0xfffffff0
mov dword [ebp - 0x2060], ebx
jbe 0x100585b3
lea esi, [ebp - 0x2014]
lea eax, [ebp - 0x204c]
call fcn.10057abb
mov ecx, dword [eax]
xor dword [esi], ecx
mov ecx, dword [eax + 4]
xor dword [esi + 4], ecx
mov ecx, dword [eax + 8]
xor dword [esi + 8], ecx
mov eax, dword [eax + 0xc]
xor dword [esi + 0xc], eax
mov eax, dword [ebp - 0x2054]
inc dword [ebp - 0x2060]
shr eax, 4
add esi, 0x10
cmp dword [ebp - 0x2060], eax
jb 0x10058572
mov esi, dword [ebp - 0x2058]
push ebx
lea eax, [ebp - 0x2068]
push eax
push dword [ebp - 0x2054]
lea eax, [ebp - 0x2014]
push eax
push esi
mov dword [ebp - 0x2068], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10058613
push edi
lea eax, [ebp - 0x2014]
push ebx
push eax
call fcn.10062cf0
add esp, 0xc
push ebx
lea eax, [ebp - 0x2054]
push eax
push edi
lea eax, [ebp - 0x2014]
push eax
push dword [ebp - 0x2050]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1005851f
jmp 0x10058527
or dword [ebp - 0x2058], 0xffffffff
mov eax, esi
cmp eax, 0xffffffff
je 0x1005862c
cmp eax, ebx
je 0x1005862c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x2064]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea ecx, [ebp - 0x2058]
call fcn.10001340
lea ecx, [ebp - 0x2030]
call fcn.100077c0
lea ecx, [ebp - 0x2050]
call fcn.10001340
lea esi, [ebp - 0x2080]
call fcn.10059ada
mov eax, ebx
jmp 0x100582d3