Function at 0x41c6c0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x18
push ebx
mov ebx, dword [esp + 0x28]
push ebp
push esi
mov esi, dword [esp + 0x28]
movsx eax, byte [esi + 0x12d]
mov ecx, dword [esi + 0xc8]
xor edx, edx
shl eax, 6
cmp byte [esi + 0x126], 4
push edi
sete dl
xor edi, edi
lea eax, [eax + ecx + 0x1c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], edi
mov dword [esp + 0x34], ebx
mov dword [esp + 0x18], edx
xor dl, dl
cmp byte [esi + 0x127], 5
mov byte [esp + 0x2c], dl
jne 0x41c763
mov ecx, dword [esi + 0xb8]
test ecx, 0x8000
je 0x41c763
and ecx, 0xffff7fff
add eax, 8
mov dword [esi + 0xb8], ecx
cmp dword [eax], edi
je 0x41c74a
mov ecx, dword [eax]
cmp ecx, esi
je 0x41c745
cmp dword [ecx + 0x10], edi
lea eax, [ecx + 0x10]
jne 0x41c735
jmp 0x41c74a
mov ecx, dword [esi + 0x10]
mov dword [eax], ecx
movzx ebp, byte [esi + 0xb5]
and ebp, 0xc0
or ebp, 2
mov dword [esi + 0x10], edi
mov dword [esp + 0x38], ebp
jmp 0x41c767
mov ebp, dword [esp + 0x38]
cmp ebp, 3
je 0x41ca2e
cmp ebp, 7
je 0x41ca29
cmp ebp, 8
je 0x41ca29
mov al, byte [esi + 0x127]
cmp al, 5
je 0x41c7a3
cmp al, 7
je 0x41c794
cmp al, 8
jne 0x41c799
cmp ebp, 4
je 0x41c7a3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x18
ret
mov eax, dword [esi + 0xb8]
test al, 0x10
jne 0x41c9b0
mov edi, dword [esp + 0x30]
or eax, 0x20
cmp ebp, 4
mov dword [esi + 0xb8], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ebx
jl 0x41c7d4
cmp ebp, 6
jle 0x41c8af
push ebp
lea edx, [esp + 0x24]
push edx
push 0x15
push esi
call fcn.0041f220
add esp, 0x10
test eax, eax
jl 0x41ca62
je 0x41c827
cmp dword [esp + 0x24], 0
je 0x41c85c
mov eax, dword [esp + 0x1c]
or dword [esi + 0xb8], 0x8000
mov ecx, dword [eax + 8]
mov dword [esi + 0x10], ecx
push esi
mov dword [eax + 8], esi
call fcn.0041d820
mov eax, dword [esp + 0x3c]
add esp, 4
mov byte [esi + 0xb5], al
or eax, 0x40
mov dword [esp + 0x38], eax
cmp dword [esp + 0x24], 0
je 0x41c85c
mov eax, dword [esi + 0xb8]
test eax, 0x2000
je 0x41c85c
movzx edx, byte [esi + 0xb4]
and eax, 0xffffdfff
mov dword [esi + 0xb8], eax
mov eax, dword [esp + 0x38]
and eax, 0xc0
or edx, eax
mov dword [esp + 0x38], edx
mov edi, dword [esp + 0x20]
cmp dword [esp + 0x30], edi
je 0x41c8a7
test ebx, ebx
je 0x41c8a0
cmp dword [esp + 0x24], 0
jne 0x41c8a0
mov eax, dword [esi + 0xb8]
test eax, 0x2000
jne 0x41c88b
mov cl, byte [esp + 0x38]
and cl, 0x3f
mov byte [esi + 0xb4], cl
or eax, 0x2000
pop edi
mov dword [esi + 0xb8], eax
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x18
ret
and dword [esi + 0xb8], 0xffffffdf
mov ebp, dword [esp + 0x38]
mov dl, byte [esp + 0x2c]
cmp byte [esi + 0x125], 0xd
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x30], edi
jne 0x41c9b0
cmp dword [esp + 0x18], 0
je 0x41c8e3
lea ecx, [edi - 4]
mov byte [esp + 0x2c], 0x80
mov dl, byte [esp + 0x2c]
mov dword [esp + 0x10], 4
mov dword [esp + 0x14], ecx
and ebp, 0xf
cmp ebp, 6
ja case.0x41c8ef.3
jmp dword [ebp*4 + 0x41cab8]
mov ecx, 1
jmp 0x41c91b
mov ecx, 2
jmp 0x41c91b
xor ecx, ecx
jmp 0x41c91b
mov ecx, 8
jmp 0x41c91b
mov ecx, 9
jmp 0x41c91b
mov ecx, 0xa
test byte [esp + 0x38], 0x40
jne 0x41c928
or ecx, 0x80
mov eax, dword [esp + 0x24]
cmp eax, 0x7e
jae 0x41c949
mov eax, dword [esp + 0x10]
add eax, 2
sub edi, eax
mov dword [esp + 0x10], eax
mov al, bl
or al, dl
mov byte [edi], cl
mov byte [edi + 1], al
jmp 0x41c9ac
mov ebp, dword [esp + 0x10]
cmp eax, 0x10000
mov eax, edi
jae 0x41c970
add ebp, 4
sub eax, ebp
mov byte [eax], cl
or dl, 0x7e
mov ecx, ebx
mov byte [eax + 1], dl
shr ecx, 8
mov byte [eax + 2], cl
mov byte [eax + 3], bl
jmp 0x41c9a8
add ebp, 0xa
sub eax, ebp
mov byte [eax], cl
or dl, 0x7f
mov byte [eax + 1], dl
mov byte [eax + 2], 0
mov byte [eax + 3], 0
mov byte [eax + 4], 0
mov byte [eax + 5], 0
mov edx, ebx
shr edx, 0x18
mov byte [eax + 6], dl
mov ecx, ebx
shr ecx, 0x10
mov edx, ebx
mov byte [eax + 7], cl
shr edx, 8
mov byte [eax + 8], dl
mov byte [eax + 9], bl
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x38]
cmp dword [esp + 0x18], 0
je 0x41ca29
test byte [esi + 0xb8], 0x10
jne 0x41c9e7
call fcn.0041c4f0
test eax, eax
je 0x41c9e3
push str.frame_mask_generation_failed_n
push 1
call fcn.0041dc50
add esp, 8
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x18
ret
mov ebp, dword [esp + 0x38]
cmp dword [esp + 0x14], 0
je 0x41ca29
mov eax, 4
lea edi, [ebx + 4]
cmp edi, eax
jle 0x41ca20
lea ebx, [ebx]
movzx ecx, byte [esi + 0xae]
and ecx, 3
mov dl, byte [ecx + esi + 0x1c]
mov ecx, dword [esp + 0x14]
xor byte [eax + ecx], dl
inc byte [esi + 0xae]
inc eax
cmp eax, edi
jl 0x41ca00
mov eax, dword [esi + 0x1c]
mov ecx, dword [esp + 0x14]
mov dword [ecx], eax
cmp ebp, 3
jl 0x41ca6d
cmp ebp, 8
jg 0x41ca6d
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
lea edx, [ecx + ebx]
push edx
sub eax, ecx
push eax
push esi
call fcn.0041c520
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
push str.lws_write:_unknown_write_opc___wp_n
push 2
call fcn.0041dc50
add esp, 8
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x18
ret
mov edi, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
add ebx, edi
push ebx
sub eax, edi
push eax
push esi
call fcn.0041f330
or dword [esi + 0xb8], 0x10
mov ecx, dword [esi + 0xb8]
add esp, 0xc
test eax, eax
jle 0x41cab0
cmp eax, ebx
jne 0x41caae
mov eax, dword [esp + 0x34]
pop edi
and ecx, 0xffffffef
mov dword [esi + 0xb8], ecx
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
sub eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret