Function at 0x10005840
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10028f73
mov eax, dword fs:[0]
push eax
sub esp, 0x84
mov eax, dword [0x1003867c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor esi, esi
push esi
push 0x80
push 3
push esi
mov dword [ebp - 4], 1
cmp dword [ebp + 0x1c], 8
push 1
lea eax, [ebp + 8]
cmovae eax, dword [ebp + 8]
push 0x80000000
push eax
call dword [0x1003a6fc]
mov dword [ebp - 0x40], eax
cmp eax, 0xffffffff
je 0x10005c1c
cmp dword [ebp + 0x34], 8
push esi
push 0x80
push 2
push esi
push esi
lea eax, [ebp + 0x20]
cmovae eax, dword [ebp + 0x20]
push 0x40000000
push eax
call dword [0x1003a6fc]
mov ebx, eax
mov dword [ebp - 0x44], ebx
cmp ebx, 0xffffffff
je 0x10005c13
push str.5c388d773f6df4504677a890536108777911d8e9fba77d1a722bb7076425425761
lea ecx, [ebp - 0x90]
mov dword [ebp - 0x14], esi
call fcn.100090e0
lea ecx, [ebp - 0x78]
push ecx
mov ecx, eax
mov byte [ebp - 4], 2
call fcn.10009140
lea ecx, [ebp - 0x34]
push ecx
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.10009360
cmp dword [ebp - 0x64], 8
jb 0x10005916
push dword [ebp - 0x78]
call fcn.1001534f
add esp, 4
xor eax, eax
mov dword [ebp - 0x64], 7
mov dword [ebp - 0x68], 0
mov word [ebp - 0x78], ax
mov byte [ebp - 4], 6
cmp dword [ebp - 0x7c], 8
jb 0x10005942
push dword [ebp - 0x90]
call fcn.1001534f
add esp, 4
xor eax, eax
cmp dword [ebp - 0x20], 0x10
push 0
lea ecx, [ebp - 0x14]
push ecx
push dword [ebp - 0x24]
mov word [ebp - 0x90], ax
lea eax, [ebp - 0x34]
cmovae eax, dword [ebp - 0x34]
push eax
push ebx
mov dword [ebp - 0x7c], 7
mov dword [ebp - 0x80], 0
call dword [0x1003a6f8]
push 0
lea eax, [ebp - 0x14]
push eax
push 4
lea eax, [ebp - 0x1c]
push eax
push ebx
mov dword [ebp - 0x1c], 0
call dword [0x1003a6f8]
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
call fcn.10005730
or ebx, 0xffffffff
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x48], ebx
push 0x10
mov byte [ebp - 4], 7
call fcn.100150d0
mov edi, eax
add esp, 4
mov dword [ebp - 0x5c], edi
call dword [0x1003a728]
push eax
call fcn.10015a97
add esp, 4
xor esi, esi
call fcn.10015a74
mov byte [esi + edi], al
inc esi
cmp esi, 0x10
jb 0x100059d2
push 0
lea eax, [ebp - 0x14]
push eax
push 0x10
push edi
push dword [ebp - 0x44]
call dword [0x1003a6f8]
test edi, edi
je 0x10005a60
mov esi, dword [ebp - 0x4c]
test esi, esi
jne 0x10005a0e
push 0x10035200
lea eax, [ebp - 0x40]
push eax
mov dword [ebp - 0x40], esi
call fcn.1001776b
lea edx, [edi + 1]
mov edi, 4
movzx ecx, byte [edx - 1]
movzx eax, bl
xor ecx, eax
movzx eax, byte [edx]
shr ebx, 8
xor ebx, dword [esi + ecx*4]
lea edx, [edx + 4]
movzx ecx, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [esi + ecx*4]
movzx ecx, byte [edx - 3]
movzx eax, bl
xor ecx, eax
movzx eax, byte [edx - 2]
shr ebx, 8
xor ebx, dword [esi + ecx*4]
movzx ecx, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [esi + ecx*4]
mov dword [ebp - 0x48], ebx
dec edi
jne 0x10005a16
mov edi, dword [ebp - 0x5c]
mov dword [ebp - 0x58], ebx
push 0x1000
mov dword [ebp - 0x18], 0
call fcn.100150d0
push 0x1000
mov dword [ebp - 0x50], eax
call fcn.100150d0
mov edx, dword [ebp - 0x50]
add esp, 8
lea ecx, [edx + 2]
mov dword [ebp - 0x60], ecx
mov ecx, edx
xor esi, esi
sub ecx, eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x54], ecx
push 0
lea eax, [ebp - 0x18]
push eax
push 0x1000
push edx
push dword [ebp - 0x40]
call dword [0x1003a6d8]
mov edx, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x54]
mov dword [ebp - 0x3c], 0x400
jmp 0x10005ac0
cmp esi, 0x10
jb 0x10005ac8
sub esi, 0x10
mov al, byte [ebx + ecx]
xor al, byte [esi + edi]
inc esi
mov byte [ecx], al
cmp esi, 0x10
jb 0x10005ad9
sub esi, 0x10
mov al, byte [esi + edi]
xor al, byte [edx - 1]
inc esi
mov byte [ecx + 1], al
cmp esi, 0x10
jb 0x10005aeb
sub esi, 0x10
mov al, byte [esi + edi]
xor al, byte [edx]
inc esi
mov byte [ecx + 2], al
cmp esi, 0x10
jb 0x10005afc
sub esi, 0x10
mov al, byte [esi + edi]
xor al, byte [edx + 1]
inc esi
mov byte [ecx + 3], al
add ecx, 4
add edx, 4
dec dword [ebp - 0x3c]
jne 0x10005ac0
mov ebx, dword [ebp - 0x58]
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
mov dword [ebp - 0x3c], esi
push dword [ebp - 0x38]
push dword [ebp - 0x44]
call dword [0x1003a6f8]
cmp dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x18]
je 0x10005b6a
cmp dword [ebp - 0x4c], 0
je 0x10005b76
xor edx, edx
test eax, eax
jle 0x10005b6c
mov edi, dword [ebp - 0x38]
mov esi, dword [ebp - 0x4c]
movzx eax, byte [edx + edi]
movzx ecx, bl
xor ecx, eax
mov eax, dword [ebp - 0x18]
shr ebx, 8
xor ebx, dword [esi + ecx*4]
inc edx
mov dword [ebp - 0x48], ebx
cmp edx, eax
jl 0x10005b47
mov esi, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x5c]
mov dword [ebp - 0x58], ebx
test eax, eax
je 0x10005b8b
mov edx, dword [ebp - 0x50]
jmp 0x10005a96
push 0x10035200
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x54], 0
call fcn.1001776b
push 0
push 0
push dword [ebp - 0x24]
push dword [ebp - 0x44]
call dword [0x1003a724]
push 0
lea eax, [ebp - 0x14]
push eax
not ebx
push 4
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], ebx
mov ebx, dword [ebp - 0x44]
push eax
push ebx
call dword [0x1003a6f8]
push dword [ebp - 0x38]
mov esi, 1
call fcn.10015a24
mov eax, dword [ebp - 0x50]
push eax
call fcn.10015a24
push edi
call fcn.10015a24
add esp, 0xc
push ebx
call dword [0x1003a6f4]
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x10005bec
push eax
call fcn.10015a24
add esp, 4
mov byte [ebp - 4], 1
cmp dword [ebp - 0x20], 0x10
jb 0x10005c01
push dword [ebp - 0x34]
call fcn.1001534f
add esp, 4
mov dword [ebp - 0x20], 0xf
mov dword [ebp - 0x24], 0
mov byte [ebp - 0x34], 0
push dword [ebp - 0x40]
call dword [0x1003a6f4]
cmp dword [ebp + 0x1c], 8
jb 0x10005c2d
push dword [ebp + 8]
call fcn.1001534f
add esp, 4
xor eax, eax
cmp dword [ebp + 0x34], 8
mov dword [ebp + 0x1c], 7
mov dword [ebp + 0x18], 0
mov word [ebp + 8], ax
jb 0x10005c52
push dword [ebp + 0x20]
call fcn.1001534f
add esp, 4
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 - 0x10]
xor ecx, ebp
call fcn.1001520a
mov esp, ebp
pop ebp
ret