Function at 0x604380
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 0x106
jae 0x6043d2
mov ecx, dword [ebp - 0xc]
call fcn.00601b50
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x6c], 0x106
jae 0x6043c4
cmp dword [ebp + 8], 0
jne 0x6043c4
xor eax, eax
jmp 0x604737
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x6c], 0
jne 0x6043d2
jmp 0x6046b2
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 3
jb 0x60444c
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + 0x40]
mov ecx, dword [edx + 0x50]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x28]
movzx edx, byte [ecx + edx + 2]
xor eax, edx
mov ecx, dword [ebp - 0xc]
and eax, dword [ecx + 0x4c]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x40], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x40]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x38]
movzx ecx, word [eax + ecx*2]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
and ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x30]
mov dx, word [ebp - 8]
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x40]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x38]
mov edx, dword [ebp - 0xc]
mov dx, word [edx + 0x64]
mov word [eax + ecx*2], dx
cmp dword [ebp - 8], 0
je 0x604488
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x64]
sub ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x1c]
sub eax, 0x106
cmp ecx, eax
ja 0x604488
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x80], 2
je 0x604488
mov edx, dword [ebp - 8]
push edx
mov ecx, dword [ebp - 0xc]
call fcn.00604740
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x58], eax
mov edx, dword [ebp - 0xc]
cmp dword [edx + 0x58], 3
jb 0x604605
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x58]
sub ecx, 3
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
sub ecx, dword [eax + 0x68]
push ecx
mov ecx, dword [ebp - 0xc]
call fcn.00604f10
mov dword [ebp - 4], eax
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x6c]
sub ecx, dword [eax + 0x58]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x6c], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [eax + 0x58]
cmp edx, dword [ecx + 0x78]
ja 0x6045a4
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x6c], 3
jb 0x6045a4
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x58]
sub edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x58], edx
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
add edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x64], edx
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov eax, dword [ecx + 0x40]
mov ecx, dword [edx + 0x50]
shl eax, cl
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx + 0x28]
movzx edx, byte [ecx + edx + 2]
xor eax, edx
mov ecx, dword [ebp - 0xc]
and eax, dword [ecx + 0x4c]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x40], eax
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x40]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x38]
movzx ecx, word [eax + ecx*2]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
and ecx, dword [eax + 0x24]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x30]
mov dx, word [ebp - 8]
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x40]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x38]
mov edx, dword [ebp - 0xc]
mov dx, word [edx + 0x64]
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x58]
sub ecx, 1
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x58], ecx
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x58], 0
jne 0x6044f7
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
add edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x64], edx
jmp 0x604603
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
mov eax, dword [ebp - 0xc]
add edx, dword [eax + 0x58]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x64], edx
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x58], 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x28]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x64]
movzx ecx, byte [ecx + eax]
mov edx, dword [ebp - 0xc]
mov dword [edx + 0x40], ecx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [eax + 0x40]
mov ecx, dword [ecx + 0x50]
shl edx, cl
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x64]
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x28]
movzx ecx, byte [eax + ecx + 1]
xor edx, ecx
mov eax, dword [ebp - 0xc]
and edx, dword [eax + 0x4c]
mov ecx, dword [ebp - 0xc]
mov dword [ecx + 0x40], edx
jmp 0x604641
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x28]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
movzx eax, byte [eax + edx]
push eax
push 0
mov ecx, dword [ebp - 0xc]
call fcn.00604f10
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x6c]
sub edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x6c], edx
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
add edx, 1
mov eax, dword [ebp - 0xc]
mov dword [eax + 0x64], edx
cmp dword [ebp - 4], 0
je 0x6046ad
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0x54], 0
jl 0x604661
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x28]
mov ecx, dword [ebp - 0xc]
add eax, dword [ecx + 0x54]
mov dword [ebp - 0x10], eax
jmp 0x604668
mov dword [ebp - 0x10], 0
push 0
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
sub ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov ecx, dword [ebp - 0xc]
call fcn.00601d70
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
mov dword [eax + 0x54], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.005ec6d0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
cmp dword [edx + 0x24], 0
jne 0x6046ad
xor eax, eax
jmp 0x604737
jmp 0x604397
mov eax, dword [ebp - 0xc]
cmp dword [eax + 0x54], 0
jl 0x6046cc
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x28]
mov eax, dword [ebp - 0xc]
add edx, dword [eax + 0x54]
mov dword [ebp - 0x14], edx
jmp 0x6046d3
mov dword [ebp - 0x14], 0
xor ecx, ecx
cmp dword [ebp + 8], 4
sete cl
push ecx
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0xc]
mov ecx, dword [edx + 0x64]
sub ecx, dword [eax + 0x54]
push ecx
mov edx, dword [ebp - 0x14]
push edx
mov ecx, dword [ebp - 0xc]
call fcn.00601d70
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x64]
mov dword [eax + 0x54], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 4]
call fcn.005ec6d0
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 4]
cmp dword [edx + 0x24], 0
jne 0x60472a
xor eax, eax
cmp dword [ebp + 8], 4
setne al
sub eax, 1
and eax, 2
jmp 0x604737
xor eax, eax
cmp dword [ebp + 8], 4
sete al
lea eax, [eax + eax + 1]
mov esp, ebp
pop ebp
ret 4