Function at 0x5f6d20
Capabilities:
Encode data using xor

Disassembly:
mov al, byte [esp + 0xc]
neg al
push esi
push edi
mov edi, dword [esp + 0xc]
mov esi, ecx
movzx ecx, word [edi]
sbb eax, eax
add eax, 7
cmp ecx, eax
je 0x5f6d41
pop edi
xor al, al
pop esi
ret 0xc
movzx ecx, word [edi + 2]
cmp word [edi + 0xc], cx
jne 0x5f6d3a
movzx edx, cx
push ebx
mov ebx, dword [edi + 4]
imul edx, ebx
cmp dword [edi + 8], edx
jne 0x5f6d61
cmp word [edi + 0xe], 8
je 0x5f6d69
pop ebx
pop edi
xor al, al
pop esi
ret 0xc
mov eax, dword [esp + 0x14]
test eax, eax
push ebp
je 0x5f6ddd
cmp word [eax], 1
jne 0x5f6da3
movzx edx, word [eax + 2]
cmp dx, cx
jne 0x5f6da3
mov ebp, dword [eax + 4]
cmp ebp, ebx
jne 0x5f6da3
movzx ecx, word [eax + 0xe]
cmp cx, 8
jne 0x5f6dac
cmp word [eax + 0xc], dx
jne 0x5f6da3
movzx ecx, dx
imul ecx, ebp
cmp dword [eax + 8], ecx
je 0x5f6dca
pop ebp
pop ebx
pop edi
xor al, al
pop esi
ret 0xc
cmp cx, 0x10
jne 0x5f6da3
movzx ecx, dx
movzx edx, word [eax + 0xc]
lea ebx, [ecx + ecx]
cmp edx, ebx
jne 0x5f6da3
imul ecx, ebp
add ecx, ecx
cmp dword [eax + 8], ecx
jne 0x5f6da3
movzx ecx, word [eax + 0x10]
add ecx, 0x12
push ecx
push eax
lea ecx, [esi + 0x38]
call fcn.00495020
jmp 0x5f6e31
push 0x12
lea ecx, [esi + 0x38]
call fcn.0041ad30
mov edx, dword [esi + 0x3c]
mov word [edx], 1
mov eax, dword [esi + 0x3c]
mov cx, word [edi + 2]
mov word [eax + 2], cx
mov edx, dword [esi + 0x3c]
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov ecx, dword [esi + 0x3c]
mov word [ecx + 0xe], 0x10
mov dx, word [edi + 2]
mov eax, dword [esi + 0x3c]
add dx, dx
mov word [eax + 0xc], dx
mov eax, dword [esi + 0x3c]
movzx ecx, word [eax + 0xc]
imul ecx, dword [eax + 4]
mov dword [eax + 8], ecx
mov edx, dword [esi + 0x3c]
mov word [edx + 0x10], 0
movzx eax, word [edi + 0x10]
add eax, 0x12
push eax
push edi
lea ecx, [esi + 0x30]
call fcn.00495020
mov ecx, dword [esi + 0x3c]
cmp word [ecx + 0xe], 0x10
setae dl
cmp byte [esp + 0x1c], 0
mov byte [esi + 5], dl
je 0x5f6ef5
xor eax, eax
lea ecx, [esi + 0x2c0]
mov edx, eax
xor edx, 0x15
shl edx, 4
add edx, 8
mov word [ecx], dx
add eax, 1
add ecx, 2
cmp eax, 0x20
jl 0x5f6e63
xor edx, edx
lea ecx, [esi + 0x300]
mov eax, edx
xor eax, 5
mov edi, eax
shl edi, 5
add edi, 0x210
mov word [ecx + 0x20], di
mov edi, eax
shl edi, 6
add edi, 0x420
mov word [ecx], di
mov edi, eax
shl edi, 7
add edi, 0x840
mov word [ecx - 0xa0], di
mov edi, eax
shl edi, 8
add edi, 0x1080
mov word [ecx - 0xc0], di
mov edi, eax
shl edi, 9
shl eax, 0xa
add edi, 0x2100
add eax, 0x4200
mov word [ecx - 0x60], di
mov word [ecx - 0x80], ax
add edx, 1
add ecx, 2
cmp edx, 0x10
jl 0x5f6e84
jmp 0x5f6f91
xor edx, edx
lea ecx, [esi + 0x31e]
lea ecx, [ecx]
movzx eax, dx
lea edi, [eax*8]
mov word [ecx + 0x20], di
mov edi, eax
shl edi, 4
add edi, 0x84
mov word [ecx], di
mov edi, eax
shl edi, 5
add edi, 0x18c
mov word [ecx - 0x20], di
mov edi, eax
shl edi, 6
add edi, 0x39c
mov word [ecx - 0x40], di
mov edi, eax
shl edi, 7
add edi, 0x7bc
mov word [ecx - 0x60], di
mov edi, eax
shl edi, 8
add edi, 0xffc
mov word [ecx - 0x80], di
mov edi, eax
shl edi, 9
shl eax, 0xa
add edi, 0x207c
add eax, 0x417c
mov word [ecx - 0xa0], di
mov word [ecx - 0xc0], ax
add edx, 1
sub ecx, 2
cmp edx, 0x10
jl 0x5f6f00
mov word [esi + 0x33e], 0
lea edx, [esi + 0x140]
mov eax, edx
mov ecx, 0x80
mov edi, edi
mov di, word [eax + 0x100]
neg di
mov word [eax], di
add eax, 2
sub ecx, 1
jne 0x5f6fa0
movsx eax, word [edx]
add eax, 0x8080
sar eax, 8
cmp eax, 0xff
jle 0x5f6fcc
mov eax, 0xff
mov byte [esi + ecx + 0x40], al
add ecx, 1
add edx, 2
cmp ecx, 0x100
jl 0x5f6fb5
mov eax, dword [esi + 0x34]
movzx ecx, word [eax + 0xc]
shl ecx, 0xc
push ecx
lea ecx, [esi + 8]
call fcn.005f6cc0
mov edx, dword [esi + 0x3c]
movzx eax, word [edx + 0xc]
shl eax, 0xc
push eax
lea ecx, [esi + 0x1c]
call fcn.005f6cc0
pop ebp
pop ebx
pop edi
mov al, 1
pop esi
ret 0xc