Function at 0x10001680
Capabilities:
Encode data using xor
Hash data using sha1
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10029701
mov eax, dword fs:[0]
push eax
sub esp, 0x1d8
mov eax, dword [0x10045070]
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 edi, edx
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xdc], eax
mov dword [ebp - 0xd8], 0
mov dword [ebp - 0xd4], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0xd0], 0
mov dword [ebp - 0xcc], 0
push 0
push 0x80
push 4
push 0
push 0
push 0x40000000
mov byte [ebp - 4], 1
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push ecx
call esi
cmp eax, 0xffffffff
jne 0x10001755
call fcn.10002720
test eax, eax
jns 0x1000175b
xor esi, esi
mov eax, dword [ebp - 0xd0]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x1000172a
push eax
call edi
mov eax, dword [ebp - 0xd8]
test eax, eax
je 0x10001737
push eax
call edi
mov eax, esi
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.10027146
mov esp, ebp
pop ebp
ret
mov dword [ebp - 0xd0], eax
push 0
push 0x80
push 3
push 0
push 7
push 0x80000000
push edi
call esi
cmp eax, 0xffffffff
jne 0x10001780
call fcn.10002720
test eax, eax
js 0x10001715
jmp 0x10001786
mov dword [ebp - 0xd8], eax
push 0x8000
call dword [sym.imp.MSVCR110.dll_malloc]
mov edi, eax
add esp, 4
test edi, edi
je 0x10001715
xor ebx, ebx
mov dword [ebp - 0xc4], 0x67452301
mov dword [ebp - 0xc0], 0xefcdab89
mov dword [ebp - 0xbc], 0x98badcfe
mov dword [ebp - 0xb8], 0x10325476
mov dword [ebp - 0xb4], 0xc3d2e1f0
mov dword [ebp - 0xb0], 0
mov dword [ebp - 0xac], 0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x58], ebx
push 0
lea eax, [ebp - 0x58]
push eax
push 0x8000
push edi
push dword [ebp - 0xd8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1000181d
call fcn.10002720
mov esi, eax
test esi, esi
js 0x100018b8
jmp 0x1000181f
xor esi, esi
mov ecx, dword [ebp - 0x58]
test ecx, ecx
je 0x100018b8
add ebx, ecx
cmp ebx, 0x500000
jbe 0x10001840
mov eax, 0x500000
sub eax, ebx
add ecx, eax
mov dword [ebp - 0x58], ecx
push ecx
mov edx, edi
lea ecx, [ebp - 0xc4]
call fcn.10023720
mov edx, dword [ebp - 0x58]
mov ecx, edx
add esp, 4
and ecx, 3
je 0x10001867
mov eax, 4
sub eax, ecx
add edx, eax
mov dword [ebp - 0x58], edx
mov ecx, edx
shr ecx, 2
mov eax, edi
lea ecx, [edi + ecx*4]
cmp edi, ecx
jae 0x10001885
xor dword [eax], 0x5289b01b
add eax, 4
cmp eax, ecx
jb 0x10001875
mov edx, dword [ebp - 0x58]
push 0
lea eax, [ebp - 0x5c]
push eax
push edx
push edi
push dword [ebp - 0xd0]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x100018aa
call fcn.10002720
mov esi, eax
test esi, esi
js 0x100018b8
jmp 0x100018ac
xor esi, esi
cmp ebx, 0x500000
jbe 0x100017f0
push edi
mov edi, dword [sym.imp.MSVCR110.dll_free]
call edi
add esp, 4
test esi, esi
js 0x10001715
xorps xmm0, xmm0
lea eax, [ebp - 0x40]
push eax
lea edx, [ebp - 0x54]
lea ecx, [ebp - 0xc4]
mov byte [ebp - 0x40], 0
movq qword [ebp - 0x3f], xmm0
movq qword [ebp - 0x37], xmm0
movq qword [ebp - 0x2f], xmm0
movq qword [ebp - 0x27], xmm0
movq qword [ebp - 0x1f], xmm0
call fcn.10024b60
add esp, 4
lea eax, [ebp - 0x1e0]
mov dword [ebp - 0x1e4], eax
push 3
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x1e4]
mov dword [ebp - 0xc8], 0
call fcn.100025a0
mov byte [ebp - 4], 2
push dword [ebp - 0x1e4]
lea ecx, [ebp - 0xc8]
call fcn.10001dc0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x1e4]
lea ecx, [ebp - 0x1e0]
cmp eax, ecx
je 0x10001957
push eax
call edi
add esp, 4
push dword [ebp - 0xc8]
push 0x29
push dword [ebp - 0xdc]
call dword [sym.imp.MSVCR110.dll_wcscpy_s]
mov edx, dword [ebp - 0xc8]
add edx, 0xfffffff0
add esp, 0xc
mov esi, 1
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x10001717
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x10001717