Function at 0x404bd0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov ebp, dword [esp + 0x60]
mov edi, dword [ebp + 0x74]
nop
cmp edi, 0x105
jbe 0x404e5d
mov ebx, dword [ebp + 0x6c]
mov eax, dword [ebp + 0x38]
mov ecx, dword [ebp + 0x58]
mov edx, dword [ebp + 0x48]
mov esi, dword [ebp + 0x34]
movzx eax, byte [eax + ebx + 2]
shl edx, cl
mov ecx, dword [ebp + 0x40]
and esi, ebx
xor eax, edx
mov edx, dword [ebp + 0x44]
and eax, dword [ebp + 0x54]
mov dword [ebp + 0x48], eax
lea eax, [edx + eax*2]
movzx edx, word [eax]
mov word [ecx + esi*2], dx
mov word [eax], bx
test edx, edx
je 0x404c37
mov eax, dword [ebp + 0x2c]
mov ecx, ebx
sub ecx, edx
sub eax, 0x106
cmp eax, ecx
jae 0x404ea0
mov eax, dword [ebp + 0x60]
mov edx, dword [ebp + 0x16a0]
lea ecx, [edx + 1]
add edx, dword [ebp + 0x1698]
cmp eax, 2
jbe 0x404de8
sub bx, word [ebp + 0x70]
mov dword [ebp + 0x16a0], ecx
sub eax, 3
mov byte [edx], bl
mov edx, dword [ebp + 0x16a0]
mov ecx, dword [ebp + 0x1698]
lea esi, [edx + 1]
mov dword [ebp + 0x16a0], esi
mov byte [ecx + edx], bh
mov edx, dword [ebp + 0x16a0]
sub ebx, 1
mov ecx, dword [ebp + 0x1698]
lea esi, [edx + 1]
mov dword [ebp + 0x16a0], esi
mov byte [ecx + edx], al
movzx eax, al
movzx eax, byte [eax + 0x41a1e0]
add word [ebp + eax*4 + 0x498], 1
cmp bx, 0xff
jbe 0x404cb7
shr bx, 7
add bx, 0x100
movzx ebx, bx
mov edi, dword [ebp + 0x74]
mov esi, dword [ebp + 0x60]
movzx eax, byte [ebx + 0x41a2e0]
mov ecx, dword [ebp + 0x6c]
sub edi, esi
add word [ebp + eax*4 + 0x988], 1
mov eax, dword [ebp + 0x16a0]
mov dword [ebp + 0x74], edi
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x16a4]
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x38]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 0x58]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0x54]
mov dword [esp + 0x1c], eax
cmp dword [ebp + 0x80], esi
jb 0x404d12
cmp edi, 2
ja 0x404eb0
mov ebx, dword [esp + 0x14]
add esi, ecx
mov dword [ebp + 0x60], 0
mov dword [ebp + 0x6c], esi
movzx ecx, byte [esp + 0x18]
movzx eax, byte [ebx + esi]
mov dword [ebp + 0x48], eax
movzx edx, byte [ebx + esi + 1]
shl eax, cl
xor edx, eax
mov eax, dword [esp + 0x1c]
and edx, eax
mov dword [ebp + 0x48], edx
mov esi, dword [esp + 0x24]
cmp dword [esp + 0x20], esi
jne 0x404be0
mov edx, dword [ebp + 0x5c]
mov eax, dword [ebp + 0x6c]
xor ecx, ecx
sub eax, edx
test edx, edx
js 0x404d61
mov ecx, dword [ebp + 0x38]
add ecx, edx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp + 0xc], 0
mov dword [esp], ebp
call sym.__tr_flush_block
mov esi, dword [ebp]
mov eax, dword [ebp + 0x6c]
mov edi, dword [esi + 0x1c]
mov dword [ebp + 0x5c], eax
mov dword [esp], edi
call sym.__tr_flush_bits
mov ebx, dword [edi + 0x14]
mov eax, dword [esi + 0x10]
cmp ebx, eax
cmova ebx, eax
test ebx, ebx
je 0x404dc9
mov eax, dword [esi + 0xc]
mov edx, dword [edi + 0x10]
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._memcpy
add dword [esi + 0xc], ebx
add dword [edi + 0x10], ebx
add dword [esi + 0x14], ebx
sub dword [esi + 0x10], ebx
sub dword [edi + 0x14], ebx
jne 0x404dc9
mov eax, dword [edi + 8]
mov dword [edi + 0x10], eax
mov eax, dword [ebp]
mov ebx, dword [eax + 0x10]
test ebx, ebx
jne 0x404bdb
add esp, 0x4c
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0x38]
movzx eax, byte [eax + ebx]
mov dword [ebp + 0x16a0], ecx
mov byte [edx], 0
mov edx, dword [ebp + 0x16a0]
mov ecx, dword [ebp + 0x1698]
lea ebx, [edx + 1]
mov dword [ebp + 0x16a0], ebx
mov byte [ecx + edx], 0
mov edx, dword [ebp + 0x16a0]
mov ecx, dword [ebp + 0x1698]
lea ebx, [edx + 1]
mov dword [ebp + 0x16a0], ebx
mov byte [ecx + edx], al
add word [ebp + eax*4 + 0x94], 1
mov eax, dword [ebp + 0x74]
add dword [ebp + 0x6c], 1
lea edi, [eax - 1]
mov eax, dword [ebp + 0x16a4]
mov dword [ebp + 0x74], edi
cmp dword [ebp + 0x16a0], eax
je 0x404d4e
cmp edi, 0x105
ja 0x404bec
mov eax, ebp
call sym._fill_window
mov eax, dword [ebp + 0x74]
cmp eax, 0x105
ja 0x404bec
mov esi, dword [esp + 0x64]
test esi, esi
je 0x404dd7
test eax, eax
je 0x404f50
mov ebx, dword [ebp + 0x6c]
cmp eax, 2
jbe 0x404c37
jmp 0x404bef
mov eax, ebp
call sym._longest_match
mov dword [ebp + 0x60], eax
jmp 0x404c3a
mov eax, dword [ebp + 0x44]
lea ebx, [esi - 1]
mov dword [esp + 0x34], esi
lea edx, [ecx + 1]
mov dword [ebp + 0x60], ebx
mov dword [esp + 0x28], eax
mov eax, dword [ebp + 0x40]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x2c], eax
mov eax, dword [ebp + 0x34]
mov dword [esp + 0x38], edi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x48]
lea esi, [esi]
movzx ecx, byte [esp + 0x18]
mov edi, dword [esp + 0x14]
mov dword [ebp + 0x6c], edx
mov esi, dword [esp + 0x1c]
sub dword [esp + 0x10], 1
shl eax, cl
movzx ecx, byte [edi + edx + 2]
mov edi, dword [esp + 0x28]
xor eax, ecx
and eax, esi
mov esi, dword [esp + 0x2c]
lea ecx, [edi + eax*2]
mov edi, dword [esp + 0x30]
mov dword [ebp + 0x48], eax
movzx ebx, word [ecx]
and edi, edx
mov word [esi + edi*2], bx
mov edi, dword [esp + 0x10]
mov word [ecx], dx
add edx, 1
mov dword [ebp + 0x60], edi
test edi, edi
jne 0x404ee8
mov esi, dword [esp + 0x34]
mov ecx, dword [esp + 0x3c]
mov edi, dword [esp + 0x38]
lea eax, [esi + ecx]
mov dword [ebp + 0x6c], eax
jmp 0x404d40
mov edx, dword [ebp + 0x6c]
mov eax, 2
cmp edx, eax
cmovbe eax, edx
cmp dword [esp + 0x64], 4
mov dword [ebp + 0x16b4], eax
je 0x404fe2
mov ecx, dword [ebp + 0x16a0]
mov eax, 1
test ecx, ecx
je 0x405039
mov eax, dword [ebp + 0x5c]
xor ecx, ecx
sub edx, eax
test eax, eax
js 0x404f8d
add eax, dword [ebp + 0x38]
mov ecx, eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp + 0xc], 0
mov dword [esp], ebp
call sym.__tr_flush_block
mov edi, dword [ebp]
mov eax, dword [ebp + 0x6c]
mov esi, dword [edi + 0x1c]
mov dword [ebp + 0x5c], eax
mov dword [esp], esi
call sym.__tr_flush_bits
mov ebx, dword [esi + 0x14]
mov eax, dword [edi + 0x10]
cmp ebx, eax
cmova ebx, eax
test ebx, ebx
jne 0x405070
mov eax, dword [ebp]
mov eax, dword [eax + 0x10]
test eax, eax
setne al
add esp, 0x4c
pop ebx
movzx eax, al
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0x5c]
xor ecx, ecx
sub edx, eax
test eax, eax
js 0x404ff2
add eax, dword [ebp + 0x38]
mov ecx, eax
mov dword [esp + 8], edx
mov dword [esp + 4], ecx
mov dword [esp + 0xc], 1
mov dword [esp], ebp
call sym.__tr_flush_block
mov esi, dword [ebp]
mov eax, dword [ebp + 0x6c]
mov edi, dword [esi + 0x1c]
mov dword [ebp + 0x5c], eax
mov dword [esp], edi
call sym.__tr_flush_bits
mov ebx, dword [edi + 0x14]
mov eax, dword [esi + 0x10]
cmp ebx, eax
cmova ebx, eax
test ebx, ebx
jne 0x405041
mov eax, dword [ebp]
cmp dword [eax + 0x10], 1
sbb eax, eax
add eax, 3
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esi + 0xc]
mov edx, dword [edi + 0x10]
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._memcpy
add dword [esi + 0xc], ebx
add dword [edi + 0x10], ebx
add dword [esi + 0x14], ebx
sub dword [esi + 0x10], ebx
sub dword [edi + 0x14], ebx
jne 0x40502d
mov eax, dword [edi + 8]
mov dword [edi + 0x10], eax
jmp 0x40502d
mov eax, dword [edi + 0xc]
mov edx, dword [esi + 0x10]
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._memcpy
add dword [edi + 0xc], ebx
add dword [esi + 0x10], ebx
add dword [edi + 0x14], ebx
sub dword [edi + 0x10], ebx
sub dword [esi + 0x14], ebx
jne 0x404fcc
mov eax, dword [esi + 8]
mov dword [esi + 0x10], eax
jmp 0x404fcc