Function at 0x5c3f50
Capabilities:
Encode data using xor

Disassembly:
push ebp
push esi
mov esi, dword [esp + 0xc]
xor ebp, ebp
push edi
mov edi, 2
cmp dword [esi + 0xd88], 3
jg 0x5c3f74
push esi
call fcn.005c3d50
add esp, 4
pop edi
pop esi
pop ebp
ret
mov eax, dword [esi + 0x76]
test eax, eax
je 0x5c41a6
push ebx
cmp dword [esi], 0
jne 0x5c4189
mov edx, dword [esi + 0x6a]
mov eax, dword [esi + 0x4a]
xor ecx, ecx
mov ebx, dword [esi + 0x52]
mov cl, byte [edx + eax + 2]
and edx, 0x7fff
mov eax, ecx
mov ecx, dword [esi + 0x62]
and ecx, 0x1ff
and eax, 0x3fff
shl ecx, 5
xor eax, ecx
xor ecx, ecx
mov dword [esi + 0x62], eax
mov cx, word [ebx + eax*2]
mov eax, dword [esi + 0x4e]
test ecx, ecx
mov word [eax + edx*2], cx
mov edx, dword [esi + 0x62]
mov eax, dword [esi + 0x52]
mov bx, word [esi + 0x6a]
mov word [eax + edx*2], bx
mov ebx, dword [esi + 0x6e]
mov dword [esi + 0x66], edi
mov edi, 2
je 0x5c4025
mov edx, dword [esi + 0x66]
mov eax, dword [esi + 0x7e]
cmp edx, eax
jae 0x5c4025
mov eax, dword [esi + 0x6a]
sub eax, ecx
cmp eax, 0x7efa
ja 0x5c4025
push esi
push ecx
call fcn.005c3af0
mov edi, eax
mov eax, dword [esi + 0x76]
add esp, 8
cmp edi, eax
jbe 0x5c400b
mov edi, eax
cmp edi, 3
jne 0x5c4025
mov ecx, dword [esi + 0x6a]
mov edx, dword [esi + 0x6e]
sub ecx, edx
cmp ecx, 0x1000
jbe 0x5c4025
mov edi, 2
mov eax, dword [esi + 0x66]
cmp eax, 3
jb 0x5c40fc
cmp edi, eax
ja 0x5c40fc
mov edx, dword [esi + 0x6a]
add eax, 0xfffffffd
sub edx, ebx
push esi
dec edx
push eax
push edx
call fcn.005c5090
mov ecx, dword [esi + 0x66]
mov edi, dword [esi + 0x76]
mov edx, 1
add esp, 0xc
sub edx, ecx
add edi, edx
add ecx, 0xfffffffe
mov dword [esi + 0x76], edi
mov dword [esi + 0x66], ecx
mov ebx, dword [esi + 0x6a]
mov ecx, dword [esi + 0x4a]
mov edi, dword [esi + 0x62]
inc ebx
mov dword [esi + 0x6a], ebx
mov edx, ebx
xor ebx, ebx
and edi, 0x1ff
mov bl, byte [edx + ecx + 2]
and edx, 0x7fff
mov ecx, ebx
mov ebx, dword [esi + 0x4e]
and ecx, 0x3fff
shl edi, 5
xor ecx, edi
mov edi, dword [esi + 0x52]
mov dword [esi + 0x62], ecx
mov cx, word [edi + ecx*2]
mov word [ebx + edx*2], cx
mov edx, dword [esi + 0x62]
mov ecx, dword [esi + 0x52]
mov di, word [esi + 0x6a]
mov word [ecx + edx*2], di
mov ecx, dword [esi + 0x66]
dec ecx
mov dword [esi + 0x66], ecx
jne 0x5c4065
mov ebx, dword [esi + 0x6a]
xor ebp, ebp
inc ebx
mov edi, 2
test eax, eax
mov dword [esi + 0x6a], ebx
mov ecx, ebx
je 0x5c415b
mov edx, dword [esi + 0x5a]
test edx, edx
jl 0x5c40e3
mov ebx, dword [esi + 0x4a]
mov eax, edx
add eax, ebx
jmp 0x5c40e5
xor eax, eax
push esi
sub ecx, edx
push 0
push ecx
push eax
call fcn.005c4e10
mov edx, dword [esi + 0x6a]
add esp, 0x10
mov dword [esi + 0x5a], edx
jmp 0x5c415b
test ebp, ebp
je 0x5c4148
mov eax, dword [esi + 0x6a]
mov ecx, dword [esi + 0x4a]
xor edx, edx
push esi
mov dl, byte [eax + ecx - 1]
push edx
push 0
call fcn.005c5090
add esp, 0xc
test eax, eax
je 0x5c414d
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x5c412c
mov edx, dword [esi + 0x4a]
mov eax, ecx
add eax, edx
jmp 0x5c412e
xor eax, eax
mov edx, dword [esi + 0x6a]
push esi
sub edx, ecx
push 0
push edx
push eax
call fcn.005c4e10
mov eax, dword [esi + 0x6a]
add esp, 0x10
mov dword [esi + 0x5a], eax
jmp 0x5c414d
mov ebp, 1
mov ecx, dword [esi + 0x6a]
mov eax, dword [esi + 0x76]
inc ecx
dec eax
mov dword [esi + 0x6a], ecx
mov dword [esi + 0x76], eax
mov eax, dword [esi + 0x76]
mov ebx, 0x106
cmp eax, ebx
jae 0x5c417e
mov eax, dword [esi + 0x72]
test eax, eax
jne 0x5c417e
push esi
call fcn.005c3c40
mov eax, dword [esi + 0x76]
add esp, 4
cmp eax, ebx
jb 0x5c4167
mov eax, dword [esi + 0x76]
test eax, eax
jne 0x5c3f80
test ebp, ebp
pop ebx
je 0x5c41a6
mov ecx, dword [esi + 0x6a]
mov edx, dword [esi + 0x4a]
xor eax, eax
push esi
mov al, byte [ecx + edx - 1]
push eax
push 0
call fcn.005c5090
add esp, 0xc
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x5c41b4
mov eax, dword [esi + 0x4a]
add eax, ecx
jmp 0x5c41b6
xor eax, eax
mov edx, dword [esi + 0x6a]
push esi
sub edx, ecx
push 1
push edx
push eax
call fcn.005c4e10
add esp, 0x10
pop edi
pop esi
pop ebp
ret