Function at 0x531a80
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x18]
test edi, edi
mov dword [esp + 0x10], 0
jne 0x531aa0
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
pop ecx
ret
mov esi, dword [edi + 0x9c]
test esi, esi
jne 0x531ab5
pop edi
pop esi
pop ebp
mov eax, 0xffffff9a
pop ebx
pop ecx
ret
cmp dword [esi], 0
jne 0x531ac5
pop edi
pop esi
pop ebp
mov eax, 0xffffff9c
pop ebx
pop ecx
ret
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x531ad5
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret
mov ecx, dword [esp + 0x1c]
mov dword [esi + 0x10], ecx
mov ecx, dword [esi + 0x5c]
cmp eax, ecx
mov dword [esi + 0x14], eax
jbe 0x531af3
mov edx, dword [esi + 0x8c]
test edx, edx
jne 0x531af3
mov dword [esi + 0x14], ecx
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0x58]
add ecx, edx
cmp eax, ecx
jbe 0x531b0c
mov eax, dword [esi + 0x8c]
test eax, eax
je 0x531b0c
mov dword [esi + 0x14], ecx
mov eax, dword [esi + 0x14]
test eax, eax
ja 0x531b21
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 8]
test eax, eax
jne 0x531bfd
mov eax, dword [esi + 0x58]
test eax, eax
jbe 0x531bfd
mov ebx, 0x4000
cmp eax, ebx
jae 0x531b46
mov ebx, eax
test ebx, ebx
je 0x531acd
mov eax, dword [esi + 0x3c]
mov edx, dword [esi + 0x88]
mov ecx, dword [esi + 0x7c]
push 0
add edx, eax
mov eax, dword [esi + 0x80]
push edx
push eax
push ecx
call dword [esi + 0x70]
add esp, 0x10
test eax, eax
jne 0x531d15
mov edx, dword [esi]
mov eax, dword [esi + 0x80]
mov ecx, dword [esi + 0x7c]
push ebx
push edx
push eax
push ecx
call dword [esi + 0x64]
add esp, 0x10
cmp eax, ebx
jne 0x531d15
mov eax, dword [edi + 0xa0]
test eax, eax
je 0x531be5
xor edi, edi
test ebx, ebx
jbe 0x531be5
mov edx, dword [esp + 0x18]
lea ebp, [edx + 0xa4]
mov eax, dword [esi]
mov ecx, dword [esp + 0x18]
lea edx, [eax + edi]
mov eax, dword [ecx + 0xb0]
push eax
push ebp
call fcn.00531790
mov cl, byte [edx]
xor cl, al
mov eax, dword [esp + 0x20]
mov byte [edx], cl
mov ecx, dword [esi]
movsx edx, byte [ecx + edi]
mov ecx, dword [eax + 0xb0]
push edx
push ecx
push ebp
call fcn.005317b0
mov edx, dword [esi]
add esp, 0x14
mov byte [edi + edx], al
inc edi
cmp edi, ebx
jb 0x531ba4
mov ecx, dword [esi + 0x3c]
mov eax, dword [esi + 0x58]
add ecx, ebx
sub eax, ebx
mov dword [esi + 0x58], eax
mov eax, dword [esi]
mov dword [esi + 0x3c], ecx
mov dword [esi + 4], eax
mov dword [esi + 8], ebx
mov eax, dword [esi + 0x84]
test eax, eax
je 0x531c80
mov eax, dword [esi + 0x8c]
test eax, eax
jne 0x531c80
mov ecx, dword [esi + 0x10]
mov ebp, dword [esi + 0x18]
lea edx, [esi + 4]
push 2
push edx
mov dword [esp + 0x28], ecx
call fcn.00533f30
mov ebx, eax
add esp, 8
test ebx, ebx
jl 0x531c3b
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x531c3b
mov ebx, 0xfffffffd
mov edi, dword [esi + 0x18]
mov eax, dword [esp + 0x20]
mov ecx, dword [esi + 0x50]
sub edi, ebp
push edi
push eax
push ecx
call fcn.00532020
mov edx, dword [esi + 0x5c]
mov ecx, dword [esp + 0x1c]
sub edx, edi
add ecx, edi
add esp, 0xc
cmp ebx, 1
mov dword [esi + 0x50], eax
mov dword [esi + 0x5c], edx
mov dword [esp + 0x10], ecx
je 0x531b13
test ebx, ebx
je 0x531d00
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
pop ecx
ret
mov eax, dword [esi + 8]
test eax, eax
jne 0x531c92
mov ecx, dword [esi + 0x58]
test ecx, ecx
je 0x531b13
mov edi, dword [esi + 0x14]
cmp edi, eax
jb 0x531c9b
mov edi, eax
xor eax, eax
test edi, edi
jbe 0x531cb2
mov edx, dword [esi + 4]
mov dl, byte [eax + edx]
mov ecx, dword [esi + 0x10]
mov byte [eax + ecx], dl
inc eax
cmp eax, edi
jb 0x531ca1
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x50]
push edi
push eax
push ecx
call fcn.00532020
mov ecx, dword [esi + 0x5c]
mov ebp, dword [esi + 0x14]
mov ebx, dword [esi + 0x10]
mov edx, dword [esi + 4]
mov dword [esi + 0x50], eax
mov eax, dword [esi + 8]
sub ecx, edi
sub eax, edi
mov dword [esi + 0x5c], ecx
mov ecx, dword [esi + 0x18]
mov dword [esi + 8], eax
mov eax, dword [esp + 0x1c]
sub ebp, edi
add ebx, edi
add edx, edi
add ecx, edi
add esp, 0xc
add eax, edi
mov dword [esi + 0x14], ebp
mov dword [esi + 0x10], ebx
mov dword [esi + 4], edx
mov dword [esi + 0x18], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esi + 0x14]
test eax, eax
ja 0x531b1d
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
pop ecx
ret