Function at 0x5c3630
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 0x5c3654
push esi
call fcn.005c3430
add esp, 4
pop edi
pop esi
pop ebp
ret
mov eax, dword [esi + 0x76]
test eax, eax
je 0x5c3886
push ebx
cmp dword [esi], 0
jne 0x5c3869
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 0x5c3705
mov edx, dword [esi + 0x66]
mov eax, dword [esi + 0x7e]
cmp edx, eax
jae 0x5c3705
mov eax, dword [esi + 0x6a]
sub eax, ecx
cmp eax, 0x7efa
ja 0x5c3705
push esi
push ecx
call fcn.005c31d0
mov edi, eax
mov eax, dword [esi + 0x76]
add esp, 8
cmp edi, eax
jbe 0x5c36eb
mov edi, eax
cmp edi, 3
jne 0x5c3705
mov ecx, dword [esi + 0x6a]
mov edx, dword [esi + 0x6e]
sub ecx, edx
cmp ecx, 0x1000
jbe 0x5c3705
mov edi, 2
mov eax, dword [esi + 0x66]
cmp eax, 3
jb 0x5c37dc
cmp edi, eax
ja 0x5c37dc
mov edx, dword [esi + 0x6a]
add eax, 0xfffffffd
sub edx, ebx
push esi
dec edx
push eax
push edx
call fcn.005c4770
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 0x5c3745
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 0x5c383b
mov edx, dword [esi + 0x5a]
test edx, edx
jl 0x5c37c3
mov ebx, dword [esi + 0x4a]
mov eax, edx
add eax, ebx
jmp 0x5c37c5
xor eax, eax
push esi
sub ecx, edx
push 0
push ecx
push eax
call fcn.005c44f0
mov edx, dword [esi + 0x6a]
add esp, 0x10
mov dword [esi + 0x5a], edx
jmp 0x5c383b
test ebp, ebp
je 0x5c3828
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.005c4770
add esp, 0xc
test eax, eax
je 0x5c382d
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x5c380c
mov edx, dword [esi + 0x4a]
mov eax, ecx
add eax, edx
jmp 0x5c380e
xor eax, eax
mov edx, dword [esi + 0x6a]
push esi
sub edx, ecx
push 0
push edx
push eax
call fcn.005c44f0
mov eax, dword [esi + 0x6a]
add esp, 0x10
mov dword [esi + 0x5a], eax
jmp 0x5c382d
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 0x5c385e
mov eax, dword [esi + 0x72]
test eax, eax
jne 0x5c385e
push esi
call fcn.005c3320
mov eax, dword [esi + 0x76]
add esp, 4
cmp eax, ebx
jb 0x5c3847
mov eax, dword [esi + 0x76]
test eax, eax
jne 0x5c3660
test ebp, ebp
pop ebx
je 0x5c3886
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.005c4770
add esp, 0xc
mov ecx, dword [esi + 0x5a]
test ecx, ecx
jl 0x5c3894
mov eax, dword [esi + 0x4a]
add eax, ecx
jmp 0x5c3896
xor eax, eax
mov edx, dword [esi + 0x6a]
push esi
sub edx, ecx
push 1
push edx
push eax
call fcn.005c44f0
add esp, 0x10
pop edi
pop esi
pop ebp
ret