Function at 0x52d3c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
mov eax, edx
mov esi, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], esi
push edi
test eax, eax
je 0x52d559
test byte [ebp + 0xc], 8
jne 0x52d559
mov edi, dword [ebp + 8]
mov eax, 0xd
mov ebx, dword [esi + 0xc]
mov dword [esp + 0x1c], ebx
lea esi, [edi - 1]
test esi, esi
js 0x52d419
mov edi, edx
movzx edx, byte [esi + edi]
lea ecx, [eax*8]
xor edx, ecx
xor eax, edx
sub esi, 1
jns 0x52d402
mov edi, dword [ebp + 8]
xor edx, edx
div dword [ebx + 0xc]
mov eax, dword [ebx + 0x14]
mov ebx, dword [eax + edx*4]
test ebx, ebx
je 0x52d48d
mov eax, dword [ebx + 0x14]
inc eax
cmp edi, eax
jne 0x52d487
mov edx, dword [esp + 0x18]
lea ecx, [ebx + 0x28]
mov esi, edi
sub esi, 4
jb 0x52d451
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x52d45a
add ecx, 4
add edx, 4
sub esi, 4
jae 0x52d440
cmp esi, 0xfffffffc
je 0x52d4e1
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x52d487
cmp esi, 0xfffffffd
je 0x52d4e1
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x52d487
cmp esi, 0xfffffffe
je 0x52d4e1
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x52d487
cmp esi, 0xffffffff
je 0x52d4e1
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x52d4e1
mov ebx, dword [ebx]
test ebx, ebx
jne 0x52d428
xor esi, esi
xor ecx, ecx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x14], ecx
mov dword [eax + 0x24], 0
test esi, esi
je 0x52d4ad
lea eax, [esi + 0xc]
mov dword [esp + 0x14], ecx
mov dword [esi], eax
mov ebx, dword [ebp + 0x10]
or dword [ebx + 4], 1
lea ecx, [ebx + 4]
mov dword [esp + 0x1c], ecx
test esi, esi
jne 0x52d634
mov edi, ebx
mov ebx, dword [esp + 0x10]
test byte [edi + 4], 2
je 0x52d6d3
mov dword [edi + 0x20], 0x52c1a0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx + 0x10]
lea eax, [edi + 0x29]
sub esi, eax
mov dword [esp + 0x14], esi
call fcn.004e4f50
test eax, eax
je 0x52d50b
xor esi, esi
mov edx, dword [esp + 0x10]
xor eax, eax
mov dword [esp + 0x14], eax
mov dword [edx + 0x24], 7
jmp 0x52d4ad
lea eax, [esi + 0x16]
cdq
push edx
push eax
call fcn.0043b050
mov esi, eax
add esp, 8
test esi, esi
je 0x52d4f8
push dword [esp + 0x14]
lea eax, [edi + 0x29]
add eax, ebx
push eax
lea eax, [esi + 0xc]
push eax
call fcn.00570750
mov ecx, dword [esp + 0x28]
lea edx, [edi + 0x29]
mov eax, esi
add esp, 0xc
sub eax, edx
mov edx, ebx
add eax, 0xc
push eax
call fcn.00528e20
mov ecx, eax
add esp, 4
add ecx, dword [esp + 0x14]
jmp 0x52d491
push dword [ebp + 8]
mov ecx, dword [esi + 0xc]
lea ebx, [esi + 0x24]
call fcn.005296a0
mov dword [ebx], eax
add esp, 4
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x14], ecx
test ecx, ecx
je 0x52d5cd
lea edi, [ecx + 0x28]
mov esi, edi
mov dword [esp + 0x18], edi
lea edx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x52d586
sub esi, edx
mov edx, ecx
mov ecx, dword [esp + 0x10]
push 0
mov ecx, dword [ecx + 0xc]
call fcn.00528e20
mov eax, dword [esp + 0x18]
lea ecx, [edi + 1]
add ecx, esi
add esp, 4
mov dword [esp + 0x1c], ecx
mov eax, dword [eax + 0x10]
sub eax, esi
sub eax, 0x29
mov dword [esp + 0x14], eax
test edi, edi
je 0x52d5e1
lea edx, [edi + 1]
mov al, byte [edi]
inc edi
test al, al
jne 0x52d5c2
sub edi, edx
jmp 0x52d5e3
xor ecx, ecx
mov dword [esp + 0x18], 0
xor eax, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], eax
xor edi, edi
test ecx, ecx
je 0x52d6cb
cmp dword [ebx], 0
jne 0x52d6cb
call fcn.004e4f50
test eax, eax
jne 0x52d6c5
push eax
push 0xc
call fcn.0043b050
mov esi, eax
add esp, 8
test esi, esi
je 0x52d6c5
mov ebx, dword [ebp + 0x10]
xorps xmm0, xmm0
mov eax, dword [esp + 0x1c]
movq qword [esi], xmm0
mov dword [esi + 8], 0
mov dword [esi], eax
lea eax, [ebx + 4]
mov dword [esp + 0x1c], eax
mov dword [ebx + 0x48], 0
test edi, edi
je 0x52d672
cmp edi, dword [ebx + 0x4c]
jbe 0x52d65b
mov ecx, dword [esp + 0x10]
lea edx, [ebx + 0x44]
push edi
lea ecx, [ecx + 0x24]
call fcn.00521860
add esp, 4
test eax, eax
jne 0x52d672
mov eax, dword [ebx + 0x44]
add eax, dword [ebx + 0x48]
push edi
push dword [esp + 0x1c]
push eax
call fcn.00570750
add esp, 0xc
add dword [ebx + 0x48], edi
mov edi, dword [ebp + 0x10]
mov eax, dword [esp + 0x14]
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov dword [edi + 0xc], esi
lea edx, [edi + 0x50]
mov ecx, dword [esi]
call fcn.00541950
test byte [ebp + 0xc], 2
mov ebx, dword [esp + 0x10]
mov ecx, ebx
movzx eax, al
cdq
mov dword [edi + 0x1c], edx
mov edx, edi
mov dword [edi + 0x18], eax
mov eax, dword [esi + 4]
mov dword [edi + 0x30], eax
je 0x52d6bb
mov eax, dword [esp + 0x1c]
or dword [eax], 2
call fcn.0052bdb0
jmp 0x52d4c9
call fcn.0052bae0
jmp 0x52d4c9
mov dword [ebx], 7
mov edi, dword [ebp + 0x10]
jmp 0x52d4c5
mov eax, dword [ebx]
mov ecx, 0x52c490
mov edx, 0x52c220
cmp dword [eax + 0x30], 1
cmove ecx, edx
mov dword [edi + 0x20], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret