Function at 0x10059b17
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x110e4374]
sub esp, 0x1c
push ebx
mov ebx, ecx
push edi
mov edi, edx
test al, 1
jne 0x10059b40
or eax, 1
mov dword [0x110e4374], eax
call fcn.10059b03
mov byte [0x110e4378], al
jmp 0x10059b45
mov al, byte [0x110e4378]
test al, al
je 0x10059b57
push ecx
call fcn.10014f21
add esp, 4
jmp 0x10059d83
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 0x10059b9f
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 0x10059b9f
movzx eax, byte [edi]
movzx ecx, bl
xor ecx, eax
shr ebx, 8
xor ebx, dword [ecx*4 + 0x10009950]
inc edi
inc esi
cmp esi, edx
jne 0x10059b84
mov ecx, dword [ebp - 8]
mov esi, ecx
sub esi, edi
cmp esi, 0x10
jl 0x10059cef
push 4
lea eax, [ebp - 0x10]
push edi
push eax
call fcn.1011f7c0
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 + 0x10009550]
xor esi, dword [eax*4 + 0x10009150]
mov eax, edx
shr eax, 0x18
xor esi, dword [eax*4 + 0x10009950]
movzx eax, dl
xor esi, dword [eax*4 + 0x10009d50]
lea eax, [ebp - 0x14]
push eax
call fcn.1011f7c0
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 + 0x10009550]
xor esi, dword [eax*4 + 0x10009150]
mov eax, edx
shr eax, 0x18
xor esi, dword [eax*4 + 0x10009950]
movzx eax, dl
xor esi, dword [eax*4 + 0x10009d50]
lea eax, [ebp - 0x18]
push eax
call fcn.1011f7c0
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 + 0x10009550]
xor esi, dword [eax*4 + 0x10009150]
mov eax, edx
shr eax, 0x18
xor esi, dword [eax*4 + 0x10009950]
movzx eax, dl
xor esi, dword [eax*4 + 0x10009d50]
lea eax, [ebp - 0x1c]
push eax
call fcn.1011f7c0
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 + 0x10009550]
xor ebx, dword [eax*4 + 0x10009150]
mov eax, edx
shr eax, 0x18
xor ebx, dword [eax*4 + 0x10009950]
movzx eax, dl
xor ebx, dword [eax*4 + 0x10009d50]
cmp esi, 0x10
jge 0x10059bac
mov ecx, dword [ebp - 8]
mov esi, ecx
sub esi, edi
cmp esi, 4
jl 0x10059d51
push 4
lea eax, [ebp - 0x1c]
push edi
push eax
call fcn.1011f7c0
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 + 0x10009550]
xor ebx, dword [eax*4 + 0x10009150]
mov eax, edx
shr eax, 0x18
xor ebx, dword [eax*4 + 0x10009950]
movzx eax, dl
xor ebx, dword [eax*4 + 0x10009d50]
cmp esi, 4
jge 0x10059cf8
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 0x10059d7f
movzx eax, byte [edi]
movzx ecx, bl
xor ecx, eax
shr ebx, 8
mov eax, dword [ebp - 0xc]
xor ebx, dword [ecx*4 + 0x10009950]
inc edi
inc eax
mov dword [ebp - 0xc], eax
cmp eax, edx
jne 0x10059d61
not ebx
mov eax, ebx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret