Function at 0x539220
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63c39d
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x6a6040]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x18], esi
call fcn.00409430
mov eax, dword [esi + 4]
lea ecx, [ebp - 0x10]
xor ebx, ebx
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 4], ebx
mov edx, dword [esi + 0x18]
test dl, 1
je 0x539279
lea esi, [ebx + 2]
jmp 0x539432
xor edi, edi
test dl, 2
jne 0x5392c0
mov ecx, dword [ebp + 8]
call fcn.00574920
xor edx, edx
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edi, [eax + edx*4]
mov dword [ebp - 0x14], edi
mov edi, dword [edi]
test edi, edi
je 0x5392ba
nop dword [eax]
mov edx, dword [ebp + 8]
lea ecx, [edi + 4]
push 0x28
call fcn.004250e0
add esp, 4
test al, al
jne 0x5392e6
mov edi, dword [edi]
test edi, edi
jne 0x5392a0
mov edx, dword [esi + 0x18]
mov edi, dword [ebp - 0x14]
mov eax, dword [esi + 8]
cmp dword [esi + 0xc], eax
jb 0x5393eb
mov edi, 2
lea ecx, [eax + eax]
cmp eax, edi
cmovb ecx, edi
cmp ecx, dword [esi + 0xc]
jae 0x5392f0
lea esi, [edi + 1]
jmp 0x539432
mov esi, 1
jmp 0x539432
mov eax, dword [esi]
push edx
push esi
push ecx
mov ecx, esi
call dword [eax + 8]
mov edi, eax
mov dword [ebp - 0x24], edi
test edi, edi
je 0x539405
mov cl, byte [edi + 0x18]
not cl
test cl, 1
je 0x539405
cmp dword [esi + 0x14], 0
je 0x5393c7
xor ebx, ebx
mov dword [ebp - 0x14], ebx
cmp dword [esi + 0x10], ebx
jbe 0x5393c7
xor eax, eax
xor edx, edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], edx
mov ecx, dword [esi + 0x14]
mov ecx, dword [eax + ecx]
test ecx, ecx
je 0x5393a1
mov ebx, dword [ecx]
dec dword [esi + 0xc]
mov edi, dword [ecx + 0x20]
xor edi, dword [ecx + 0x1c]
movzx esi, byte [ecx + 0x28]
xor edi, dword [ecx + 0x18]
movzx eax, byte [ecx + 0x29]
xor edi, dword [ecx + 0x14]
movzx edx, word [ecx + 0x2a]
shl esi, 8
or eax, esi
mov esi, dword [ebp - 0x18]
shl eax, 0x10
or eax, edx
xor edx, edx
bswap edi
xor eax, edi
mov edi, dword [ebp - 0x24]
xor eax, dword [ecx + 0x24]
xor eax, dword [ecx + 0x10]
xor eax, dword [ecx + 0xc]
xor eax, dword [ecx + 8]
xor eax, dword [ecx + 4]
div dword [edi + 0x10]
mov eax, dword [edi + 0x14]
lea edx, [eax + edx*4]
mov eax, dword [edx]
mov dword [ecx], eax
mov dword [edx], ecx
mov ecx, ebx
inc dword [edi + 0xc]
test ebx, ebx
jne 0x539341
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x14]
mov eax, dword [esi + 0x14]
inc ebx
mov dword [ebp - 0x14], ebx
mov dword [edx + eax], 0
add edx, 4
mov eax, dword [ebp - 0x1c]
add eax, 4
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x1c], eax
cmp ebx, dword [esi + 0x10]
jb 0x539337
mov eax, dword [esi]
mov ecx, esi
push edi
call dword [eax + 4]
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax + 0xc]
mov ecx, dword [ebp + 8]
call fcn.00574920
xor edx, edx
div dword [esi + 0x10]
mov eax, dword [esi + 0x14]
lea edi, [eax + edx*4]
push ecx
lea ecx, [esi + 4]
push ecx
mov ecx, dword [ecx]
call fcn.00539ce0
mov ebx, eax
mov dword [ebp - 0x10], ebx
test ebx, ebx
jne 0x53940f
lea esi, [eax + 2]
jmp 0x539432
mov ebx, dword [ebp - 0x10]
mov esi, 2
jmp 0x539432
push dword [ebp + 0xc]
mov ecx, ebx
push dword [ebp + 8]
call fcn.00539e30
mov eax, dword [ebp - 0x10]
xor ebx, ebx
mov ecx, dword [edi]
mov dword [eax], ecx
mov eax, dword [ebp - 0x10]
mov dword [edi], eax
inc dword [esi + 0xc]
xor esi, esi
mov dword [ebp - 0x10], ebx
test ebx, ebx
je 0x539444
push ecx
mov ecx, dword [ebp - 0x28]
lea eax, [ebp - 0x2c]
push eax
push ebx
call fcn.00538dd0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc