Function at 0x41a720
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x1c
mov edx, dword [ebp + 8]
test edx, edx
jne 0x41a740
mov eax, 0xfffffffe
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 8]
mov esi, dword [eax + 0x1c]
test esi, esi
je 0x41a730
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x41a730
mov edx, dword [esi + 0x18]
mov dword [ebp - 0x1c], edx
cmp edx, 2
je 0x41a730
dec edx
je 0x41a88a
mov eax, dword [esi + 0x74]
test eax, eax
jne 0x41a730
cmp dword [ebp - 0x1c], 1
je 0x41a899
mov dword [esi + 0x18], 0
mov eax, dword [esi + 0x2c]
cmp dword [ebp + 0x10], eax
jb 0x41a7a4
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x41a8bc
mov edx, dword [ebp + 0x10]
mov edi, dword [ebp + 0xc]
sub edx, eax
mov dword [ebp + 0x10], edx
mov ecx, dword [ebp + 0x10]
mov dword [ebp + 0x10], eax
add edi, ecx
mov dword [ebp + 0xc], edi
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 8]
mov ecx, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
mov edx, dword [edx]
mov dword [ebp - 0x14], edx
mov dword [ecx + 4], eax
mov edx, dword [ebp + 0xc]
mov dword [ecx], edx
mov eax, esi
call dbg.fill_window
mov ecx, dword [esi + 0x74]
mov dword [ebp - 0x24], ecx
cmp ecx, 2
jbe 0x41a83c
mov edx, dword [ebp - 0x24]
mov eax, dword [esi + 0x6c]
sub edx, 2
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x20], edx
mov edi, eax
mov eax, dword [esi + 0x38]
xor edx, edx
mov ecx, dword [esi + 0x58]
mov ebx, dword [esi + 0x54]
mov dl, byte [edi + eax + 2]
mov eax, dword [esi + 0x48]
shl eax, cl
xor edx, eax
mov ecx, dword [esi + 0x34]
and edx, ebx
mov eax, dword [esi + 0x44]
mov ebx, edi
mov dword [esi + 0x48], edx
and ebx, ecx
mov ecx, dword [esi + 0x40]
mov ax, word [eax + edx*2]
mov word [ecx + ebx*2], ax
mov edx, dword [esi + 0x48]
mov eax, dword [esi + 0x44]
mov word [eax + edx*2], di
inc edi
dec dword [ebp - 0x20]
jne 0x41a7e6
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x24]
mov dword [esi + 0x74], 2
lea eax, [ecx + edx - 2]
mov dword [esi + 0x6c], eax
jmp 0x41a7c3
mov eax, dword [ebp - 0x24]
mov edx, dword [esi + 0x6c]
add eax, edx
mov dword [esi + 0x6c], eax
mov dword [esi + 0x5c], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x74], 0
mov dword [esi + 0x16b4], eax
mov dword [esi + 0x78], 2
mov dword [esi + 0x60], 2
mov dword [esi + 0x68], 0
mov edx, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
mov dword [edx], ecx
mov eax, dword [ebp - 0x18]
mov dword [edx + 4], eax
xor eax, eax
mov edx, dword [ebp - 0x1c]
mov dword [esi + 0x18], edx
jmp 0x41a735
cmp dword [esi + 4], 0x2a
jne 0x41a730
jmp 0x41a763
push eax
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ecx + 0x30]
push eax
call dbg.adler32
mov edx, dword [ebp + 8]
add esp, 0x10
mov dword [edx + 0x30], eax
jmp 0x41a774
mov eax, dword [esi + 0x44]
mov edx, dword [esi + 0x4c]
mov word [eax + edx*2 - 2], 0
mov eax, dword [esi + 0x4c]
push ebx
lea eax, [eax + eax - 2]
push eax
push 0
mov ecx, dword [esi + 0x44]
push ecx
call sym._memset
mov eax, dword [esi + 0x2c]
add esp, 0x10
mov dword [esi + 0x6c], 0
mov dword [esi + 0x5c], 0
mov dword [esi + 0x16b4], 0
jmp 0x41a78e