Function at 0x59a8da
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x904fe8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
push edi
mov dword [ebp - 0x2c], esi
mov bl, byte [esi]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
mov byte [ebp - 0x15], bl
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], eax
test bl, 0x40
jne 0x59a922
push eax
lea eax, [esi + 0x10]
push eax
push esi
call ecx
add esp, 0xc
add dword [esi + 0x20], 1
adc dword [esi + 0x24], 0
movzx eax, bl
xor ebx, ebx
push 0xf
and eax, 7
mov ecx, ebx
pop edx
sub edx, eax
mov byte [esi], al
mov dword [ebp - 0x34], edx
jmp 0x59a945
movzx eax, byte [esi + edx]
or ecx, eax
mov byte [esi + edx], bl
shl ecx, 8
inc edx
cmp edx, 0xf
jb 0x59a938
movzx eax, byte [esi + 0xf]
mov edi, dword [ebp + 0x14]
or ecx, eax
mov byte [esi + 0xf], 1
cmp ecx, edi
je 0x59a963
or eax, 0xffffffff
jmp 0x59aac2
lea eax, [edi + 0xf]
or eax, 8
shr eax, 3
add dword [esi + 0x20], eax
adc dword [esi + 0x24], ebx
cmp dword [esi + 0x24], 0x20000000
jb 0x59a98a
ja 0x59a982
cmp dword [esi + 0x20], ebx
jbe 0x59a98a
push 0xfffffffffffffffe
pop eax
jmp 0x59aac2
mov ebx, dword [ebp + 0xc]
cmp edi, 0x10
jb 0x59aa25
push 0xfffffffffffffff8
pop eax
sub eax, esi
lea ecx, [esi + 0x10]
mov dword [ebp - 0x30], eax
mov eax, edi
shr eax, 4
mov dword [ebp - 0x28], eax
mov eax, dword [ebx]
xor dword [ecx], eax
mov eax, dword [ebx + 4]
push dword [ebp - 0x20]
xor dword [ecx + 4], eax
mov eax, dword [ebx + 8]
xor dword [esi + 0x18], eax
mov eax, dword [ebx + 0xc]
xor dword [esi + 0x1c], eax
push ecx
push ecx
call dword [ebp - 0x24]
push dword [ebp - 0x20]
lea eax, [ebp - 0x14]
push eax
push esi
call dword [ebp - 0x24]
lea ecx, [esi + 0x10]
add esp, 0x18
mov esi, dword [ebp - 0x30]
dec ecx
add byte [ecx], 1
jne 0x59a9e8
lea eax, [esi + ecx]
test eax, eax
jne 0x59a9db
mov edx, dword [ebp - 0x1c]
mov ecx, dword [ebx]
mov eax, dword [ebx + 4]
xor ecx, dword [ebp - 0x14]
xor eax, dword [ebp - 0x10]
mov esi, dword [ebp - 0x2c]
mov dword [edx], ecx
mov dword [edx + 4], eax
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebx + 8]
xor eax, dword [ebp - 8]
xor ecx, dword [ebp - 0xc]
mov dword [edx + 0xc], eax
push 0x10
pop eax
mov dword [edx + 8], ecx
add ebx, eax
add edx, eax
lea ecx, [esi + 0x10]
sub edi, eax
mov dword [ebp - 0x1c], edx
sub dword [ebp - 0x28], 1
jne 0x59a9a9
test edi, edi
je 0x59aa7a
xor ecx, ecx
test edi, edi
je 0x59aa3b
mov al, byte [ecx + ebx]
xor byte [esi + ecx + 0x10], al
inc ecx
cmp ecx, edi
jb 0x59aa2f
push dword [ebp - 0x20]
lea eax, [esi + 0x10]
push eax
push eax
call dword [ebp - 0x24]
push dword [ebp - 0x20]
lea eax, [ebp - 0x14]
push eax
push esi
call dword [ebp - 0x24]
add esp, 0x18
xor edx, edx
test edi, edi
je 0x59aa7a
lea eax, [ebp - 0x14]
sub ebx, eax
sub dword [ebp - 0x1c], eax
mov esi, dword [ebp - 0x1c]
lea ecx, [ebp - 0x14]
add ecx, edx
mov al, byte [ebx + ecx]
xor al, byte [ecx]
inc edx
mov byte [esi + ecx], al
cmp edx, edi
jb 0x59aa65
mov esi, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
push 0x10
pop eax
cmp ecx, eax
jae 0x59aa95
sub eax, ecx
push eax
lea eax, [ecx + esi]
push 0
push eax
call fcn.00739c90
add esp, 0xc
push dword [ebp - 0x20]
lea eax, [ebp - 0x14]
push eax
push esi
call dword [ebp - 0x24]
mov eax, dword [ebp - 0x14]
add esp, 0xc
xor dword [esi + 0x10], eax
mov eax, dword [ebp - 0x10]
xor dword [esi + 0x14], eax
mov eax, dword [ebp - 0xc]
xor dword [esi + 0x18], eax
mov eax, dword [ebp - 8]
xor dword [esi + 0x1c], eax
mov al, byte [ebp - 0x15]
mov byte [esi], al
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.007207bc
leave
ret