Function at 0x598f15
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
xor ecx, ecx
push esi
push edi
mov edi, dword [ebp + 0x14]
mov eax, dword [ebx + 0x174]
mov dword [ebp - 0x18], eax
mov eax, edi
add eax, dword [ebx + 0x38]
adc ecx, dword [ebx + 0x3c]
cmp ecx, 0xf
ja 0x5991cd
jb 0x598f4b
cmp eax, 0xffffffe0
ja 0x5991cd
mov esi, dword [ebx + 0x168]
lea edx, [ebx + 0x40]
mov dword [ebx + 0x3c], ecx
xor ecx, ecx
mov dword [ebx + 0x38], eax
mov dword [ebp - 8], esi
mov dword [ebp - 0x14], edx
cmp dword [ebx + 0x16c], ecx
je 0x598fb1
test edi, edi
jne 0x598f87
lea eax, [ebx + 0x60]
push eax
push edx
call fcn.00599f71
and dword [ebx + 0x16c], edi
pop ecx
pop ecx
xor eax, eax
jmp 0x5991d0
lea eax, [ebx + 0x178]
mov dword [ebx + 0x16c], ecx
mov esi, edx
mov edi, eax
push 0x10
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 0x14]
pop esi
mov dword [edx], ecx
mov dword [edx + 4], ecx
mov dword [ebx + 0x48], ecx
mov dword [ebx + 0x4c], ecx
mov dword [ebp - 8], esi
jmp 0x598fba
lea eax, [ebx + 0x178]
mov dword [ebp - 0x14], edx
movzx ecx, byte [ebx + 0xc]
mov dword [ebp - 0x1c], eax
movzx eax, byte [ebx + 0xd]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0xe]
shl ecx, 8
or ecx, eax
movzx eax, byte [ebx + 0xf]
shl ecx, 8
or ecx, eax
mov eax, esi
and eax, 0xf
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x10], eax
je 0x599052
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp + 0x10]
mov dword [ebp + 0x14], eax
test edi, edi
je 0x599029
mov cl, byte [eax]
mov eax, dword [ebp - 0x10]
mov byte [ebx + esi + 0x178], cl
mov al, byte [eax + ebx + 0x10]
xor al, cl
mov ecx, dword [ebp - 0x10]
mov byte [edx], al
inc edx
mov eax, dword [ebp + 0x14]
inc esi
inc eax
dec edi
inc ecx
mov dword [ebp + 0x14], eax
and ecx, 0xf
mov dword [ebp - 0x10], ecx
lea ecx, [ebx + 0x178]
jne 0x598ff5
cmp dword [ebp - 0x10], 0
mov dword [ebp - 4], edx
jne 0x5991c2
push esi
push ecx
lea edx, [ebx + 0x60]
lea eax, [ebx + 0x40]
push edx
push eax
call fcn.00599d54
mov edx, dword [ebp - 0x14]
add esp, 0x10
xor esi, esi
mov dword [ebp - 8], esi
jmp 0x59905e
mov eax, dword [ebp + 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp + 0x14], eax
lea ecx, [ebx + 0x60]
cmp edi, 0x10
jb 0x599081
test esi, esi
je 0x599081
push esi
lea eax, [ebx + 0x178]
push eax
push ecx
push edx
call fcn.00599d54
add esp, 0x10
xor esi, esi
mov dword [ebp - 8], esi
mov ecx, 0xc00
cmp edi, ecx
jb 0x599101
mov eax, edi
mov esi, dword [ebp - 4]
xor edx, edx
div ecx
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
push ecx
push eax
lea eax, [ebx + 0x60]
push eax
push dword [ebp - 0x14]
call fcn.00599d54
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp - 0x18]
push 0xc0
push esi
push eax
call dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
add esp, 0x24
add ecx, 0xc0
mov eax, ecx
mov dword [ebp - 0xc], ecx
shr eax, 0x18
mov byte [ebx + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [ebx + 0xe], al
mov eax, dword [ebp + 0x14]
mov byte [ebx + 0xf], cl
mov ecx, 0xc00
add eax, ecx
add esi, ecx
sub edi, ecx
mov dword [ebp + 0x14], eax
sub dword [ebp - 0x10], 1
jne 0x599099
mov dword [ebp - 4], esi
mov esi, dword [ebp - 8]
jmp 0x599104
mov eax, dword [ebp + 0x14]
mov ecx, edi
and ecx, 0xfffffff0
mov dword [ebp - 0x10], ecx
je 0x599164
push ecx
push eax
lea eax, [ebx + 0x60]
mov esi, ecx
push eax
push dword [ebp - 0x14]
shr esi, 4
call fcn.00599d54
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp - 0x18]
push esi
push dword [ebp - 4]
push eax
call dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
add esp, 0x24
add ecx, esi
mov esi, dword [ebp - 8]
mov eax, ecx
mov dword [ebp - 0xc], ecx
shr eax, 0x18
mov byte [ebx + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [ebx + 0xe], al
mov eax, dword [ebp - 0x10]
add dword [ebp - 4], eax
add dword [ebp + 0x14], eax
sub edi, eax
mov byte [ebx + 0xf], cl
test edi, edi
je 0x5991c2
push dword [ebp - 0x18]
lea eax, [ebx + 0x10]
push eax
push ebx
mov dword [ebp - 0x14], eax
call dword [ebx + 0x170]
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov edx, dword [ebp - 4]
inc ecx
mov eax, ecx
mov byte [ebx + 0xf], cl
shr eax, 0x18
mov byte [ebx + 0xc], al
mov eax, ecx
shr eax, 0x10
mov byte [ebx + 0xd], al
mov eax, ecx
shr eax, 8
mov byte [ebx + 0xe], al
mov ebx, dword [ebp + 0x14]
sub ebx, edx
mov eax, dword [ebp - 0x1c]
mov cl, byte [ebx + edx]
mov byte [eax + esi], cl
mov eax, dword [ebp - 0x14]
mov al, byte [eax]
xor al, cl
inc esi
inc dword [ebp - 0x14]
mov byte [edx], al
inc edx
sub edi, 1
jne 0x5991a3
mov ebx, dword [ebp + 8]
mov dword [ebx + 0x168], esi
jmp 0x598f80
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret