Function at 0x10057d20
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x105da038]
sub esp, 0x1c
push ebx
mov ebx, ecx
push edi
mov edi, edx
test al, 1
jne 0x10057d49
or eax, 1
mov dword [0x105da038], eax
call fcn.10057d0c
mov byte [0x105da03c], al
jmp 0x10057d4e
mov al, byte [0x105da03c]
test al, al
je 0x10057d60
push ecx
call fcn.1001fa92
add esp, 4
jmp 0x10057f8c
mov ecx, dword [ebp + 8]
lea eax, [edi + 3]
add ecx, edi
and eax, 0xfffffffc
xor edx, edx
mov dword [ebp - 8], ecx
mov dword [ebp - 0xc], edx
not ebx
push esi
cmp eax, ecx
ja 0x10057da8
mov esi, edx
mov edx, eax
and dword [ebp - 4], esi
sub edx, edi
cmp edi, eax
cmova edx, dword [ebp - 4]
test edx, edx
je 0x10057da8
movzx eax, byte [edi]
movzx ecx, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [ecx*4 + 0x100097d0]
inc edi
inc esi
cmp esi, edx
jne 0x10057d8d
mov ecx, dword [ebp - 8]
mov esi, ecx
sub esi, edi
cmp esi, 0x10
jl 0x10057ef8
push 4
lea eax, [ebp - 0x10]
push edi
push eax
call fcn.10122750
mov edx, dword [ebp - 0x10]
xor edx, ebx
push 4
pop ebx
sub esi, ebx
mov ecx, edx
mov dword [ebp - 4], esi
mov eax, edx
shr eax, 8
mov esi, 0xff
and eax, esi
shr ecx, 0x10
and ecx, esi
add edi, ebx
push ebx
push edi
mov esi, dword [ecx*4 + 0x10009bd0]
xor esi, dword [eax*4 + 0x1000a3d0]
mov eax, edx
shr eax, 0x18
xor esi, dword [eax*4 + 0x100097d0]
movzx eax, dl
xor esi, dword [eax*4 + 0x10009fd0]
lea eax, [ebp - 0x14]
push eax
call fcn.10122750
mov edx, dword [ebp - 0x14]
add edi, ebx
xor edx, esi
mov esi, 0xff
mov ecx, edx
mov eax, edx
shr eax, 8
and eax, esi
shr ecx, 0x10
and ecx, esi
push ebx
push edi
mov esi, dword [ecx*4 + 0x10009bd0]
xor esi, dword [eax*4 + 0x1000a3d0]
mov eax, edx
shr eax, 0x18
xor esi, dword [eax*4 + 0x100097d0]
movzx eax, dl
xor esi, dword [eax*4 + 0x10009fd0]
lea eax, [ebp - 0x18]
push eax
call fcn.10122750
mov edx, dword [ebp - 0x18]
add edi, ebx
xor edx, esi
sub dword [ebp - 4], 8
mov ecx, edx
mov ebx, 0xff
shr ecx, 0x10
mov eax, edx
shr eax, 8
and ecx, ebx
and eax, ebx
push 4
push edi
mov esi, dword [ecx*4 + 0x10009bd0]
xor esi, dword [eax*4 + 0x1000a3d0]
mov eax, edx
shr eax, 0x18
xor esi, dword [eax*4 + 0x100097d0]
movzx eax, dl
xor esi, dword [eax*4 + 0x10009fd0]
lea eax, [ebp - 0x1c]
push eax
call fcn.10122750
mov edx, dword [ebp - 0x1c]
add esp, 0x30
xor edx, esi
mov esi, dword [ebp - 4]
add edi, 4
mov ecx, edx
mov eax, edx
shr eax, 8
sub esi, 4
and eax, ebx
shr ecx, 0x10
and ecx, ebx
mov ebx, dword [ecx*4 + 0x10009bd0]
xor ebx, dword [eax*4 + 0x1000a3d0]
mov eax, edx
shr eax, 0x18
xor ebx, dword [eax*4 + 0x100097d0]
movzx eax, dl
xor ebx, dword [eax*4 + 0x10009fd0]
cmp esi, 0x10
jge 0x10057db5
mov ecx, dword [ebp - 8]
mov esi, ecx
sub esi, edi
cmp esi, 4
jl 0x10057f5a
push 4
lea eax, [ebp - 0x1c]
push edi
push eax
call fcn.10122750
mov edx, dword [ebp - 0x1c]
sub esi, 4
xor edx, ebx
add esp, 0xc
mov ecx, edx
mov ebx, 0xff
shr ecx, 0x10
mov eax, edx
and ecx, ebx
shr eax, 8
and eax, ebx
add edi, 4
mov ebx, dword [ecx*4 + 0x10009bd0]
xor ebx, dword [eax*4 + 0x1000a3d0]
mov eax, edx
shr eax, 0x18
xor ebx, dword [eax*4 + 0x100097d0]
movzx eax, dl
xor ebx, dword [eax*4 + 0x10009fd0]
cmp esi, 4
jge 0x10057f01
mov ecx, dword [ebp - 8]
mov edx, ecx
xor eax, eax
sub edx, edi
cmp edi, ecx
pop esi
cmova edx, eax
test edx, edx
je 0x10057f88
movzx eax, byte [edi]
movzx ecx, bl
xor ecx, eax
shr ebx, 8
mov eax, dword [ebp - 0xc]
xor ebx, dword [ecx*4 + 0x100097d0]
inc edi
inc eax
mov dword [ebp - 0xc], eax
cmp eax, edx
jne 0x10057f6a
not ebx
mov eax, ebx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret