Function at 0x523800
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x613384]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x30]
push ebx
mov ebx, dword [ebp + 0x28]
push esi
push dword [ebp + 0x20]
mov esi, dword [ebp + 8]
push eax
push dword [ebp + 0x18]
mov dword [ebp - 0x1c], esi
push ecx
push dword [ebp + 0xc]
mov dword [ebp - 0x18], ebx
push esi
mov dword [ebp - 0x24], edx
call fcn.00523d70
add esp, 0x18
test eax, eax
jne 0x523af9
mov edx, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x24]
mov dword [ebp - 0x2c], eax
cmp ebx, edi
jbe 0x523860
mov eax, ebx
sub eax, edi
cmp eax, edx
jb 0x523af3
mov eax, dword [esi + 0x144]
mov ebx, edx
add ebx, dword [esi + 0x140]
mov ecx, 0
adc ecx, eax
cmp ecx, eax
jb 0x523af3
ja 0x52388b
cmp ebx, dword [esi + 0x140]
jb 0x523af3
cmp ecx, 0xf
ja 0x523af3
jb 0x52389f
cmp ebx, 0xffffffe0
ja 0x523af3
mov dword [esi + 0x140], ebx
mov dword [esi + 0x144], ecx
test edx, edx
je 0x52399a
mov eax, 0xfffffea1
lea ecx, [esi + 0x16f]
sub eax, esi
mov dword [ebp - 0x28], eax
lea eax, [esi + 0x160]
mov dword [ebp - 0x30], eax
nop dword [eax]
mov esi, dword [ebp - 0x28]
mov ebx, 0x10
cmp edx, ebx
cmovb ebx, edx
nop dword [eax]
add byte [ecx], 1
jne 0x5238ee
dec ecx
lea eax, [esi + ecx]
cmp eax, 0xc
ja 0x5238e0
mov esi, dword [ebp - 0x1c]
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x10
push dword [ebp - 0x30]
push esi
call fcn.00519ab0
add esp, 0x14
test eax, eax
jne 0x523af8
test ebx, ebx
je 0x523962
mov ecx, dword [ebp - 0x18]
lea edx, [ebp - 0x14]
sub edx, edi
sub ecx, edi
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x34], ecx
cmp dword [esi + 0x180], 0
jne 0x523936
mov cl, byte [eax + edi]
xor byte [eax + esi + 0x170], cl
mov esi, dword [ebp - 0x34]
lea ecx, [eax + edi]
mov dl, byte [ecx + edx]
xor dl, byte [ecx]
mov byte [esi + ecx], dl
mov esi, dword [ebp - 0x1c]
cmp dword [esi + 0x180], 1
jne 0x52395a
xor byte [eax + esi + 0x170], dl
lea ecx, [eax + esi]
mov edx, dword [ebp - 0x20]
inc eax
cmp eax, ebx
jb 0x523923
lea eax, [esi + 0x170]
push eax
push eax
push esi
call fcn.005234f0
mov edx, dword [ebp + 0x10]
lea ecx, [esi + 0x16f]
add dword [ebp - 0x18], ebx
sub edx, ebx
add esp, 0xc
mov dword [ebp + 0x10], edx
add edi, ebx
test edx, edx
jne 0x5238d0
mov ebx, dword [esi + 0x140]
mov ecx, dword [esi + 0x144]
mov eax, dword [esi + 0x148]
shld ecx, ebx, 3
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x14c]
shld ecx, eax, 3
shl ebx, 3
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x2c]
shl eax, 3
mov dword [ebp - 0x1c], eax
lea eax, [ecx - 4]
cmp eax, 0xc
ja 0x523af3
push ecx
lea eax, [esi + 0x150]
push eax
push dword [ebp - 0x24]
call fcn.005478f0
mov edx, dword [ebp - 0x20]
mov eax, ebx
mov edi, dword [ebp - 0x1c]
add esp, 0xc
or eax, edx
mov ecx, dword [ebp - 0x18]
jne 0x5239f8
mov eax, edi
or eax, ecx
je 0x523ae0
mov eax, ecx
mov byte [ebp - 0x11], cl
shr eax, 0x18
mov byte [ebp - 0x14], al
mov eax, ecx
shr eax, 0x10
mov byte [ebp - 0x13], al
mov eax, ecx
shr eax, 8
mov ecx, edi
mov byte [ebp - 0x12], al
mov eax, dword [ebp - 0x18]
shrd ecx, eax, 0x18
mov byte [ebp - 9], dl
mov byte [ebp - 0x10], cl
mov ecx, edi
mov edi, eax
mov byte [ebp - 5], bl
shrd ecx, eax, 0x10
mov byte [ebp - 0xf], cl
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
shrd eax, edi, 8
mov byte [ebp - 0xd], cl
mov ecx, ebx
mov byte [ebp - 0xe], al
mov eax, edx
shr eax, 0x18
mov byte [ebp - 0xc], al
mov eax, edx
shr eax, 0x10
mov byte [ebp - 0xb], al
mov eax, edx
shr eax, 8
mov byte [ebp - 0xa], al
mov eax, edx
shrd ecx, eax, 0x18
mov byte [ebp - 8], cl
mov ecx, ebx
shrd ecx, eax, 0x10
mov eax, ebx
shrd eax, edx, 8
mov byte [ebp - 7], cl
xor ecx, ecx
mov byte [ebp - 6], al
nop word [eax + eax]
movzx eax, byte [ebp + ecx - 0x14]
xor byte [esi + ecx + 0x170], al
movzx eax, byte [ebp + ecx - 0x13]
xor byte [esi + ecx + 0x171], al
movzx eax, byte [ebp + ecx - 0x12]
xor byte [esi + ecx + 0x172], al
movzx eax, byte [ebp + ecx - 0x11]
xor byte [esi + ecx + 0x173], al
add ecx, 4
cmp ecx, 0x10
jb 0x523a80
lea edi, [esi + 0x170]
push edi
push edi
push esi
call fcn.005234f0
mov edx, dword [ebp + 0x2c]
add esp, 0xc
xor ecx, ecx
test edx, edx
je 0x523ae0
mov ebx, dword [ebp - 0x24]
mov al, byte [edi + ecx]
xor byte [ebx + ecx], al
inc ecx
cmp ecx, edx
jb 0x523ad5
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00544c5a
mov esp, ebp
pop ebp
ret
mov eax, 0xffffffec
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00544c5a
mov esp, ebp
pop ebp
ret