Function at 0x45b970
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xd8
push ebx
push ebp
mov ebp, dword [esp + 0xe4]
push esi
push edi
push ebp
call dword [0x4ce56c]
add esp, 4
test eax, eax
je 0x45bb86
mov cl, byte [ebp]
cmp cl, 8
jb 0x45bb86
cmp cl, 0xd0
ja 0x45bb86
mov al, byte [ebp + 1]
cmp al, 8
mov byte [esp + 0x10], al
ja 0x45bb86
mov dl, byte [ebp + 2]
cmp dl, 8
ja 0x45bb86
mov di, word [ebp + 4]
mov bl, cl
dec cl
mov word [ebp + 4], 0
test bl, bl
mov eax, 0x144
mov esi, ebp
mov byte [esp + 0x14], cl
je 0x45b9ff
mov ecx, dword [esp + 0x14]
and ecx, 0xff
inc ecx
xor ebx, ebx
mov bl, byte [esi]
xor eax, ebx
inc esi
mov ebx, eax
shr ebx, 0x1d
shl eax, 3
or eax, ebx
dec ecx
jne 0x45b9eb
mov ecx, eax
shr ecx, 0x10
xor eax, ecx
mov ecx, dword [0x4ae21c]
test ecx, ecx
je 0x45ba15
xor eax, 0xaa55
cmp di, ax
je 0x45ba7b
test ecx, ecx
je 0x45bb86
mov ecx, dword [0x4ce550]
test ecx, ecx
jne 0x45bb86
xor eax, 0xaa55
cmp di, ax
jne 0x45bb86
mov eax, dword [0x4ce540]
mov dword [0x4ce550], 2
cmp eax, 1
je 0x45ba5b
cmp eax, 2
jne 0x45bb86
push 0x9f
call fcn.0046f7f0
push eax
call fcn.00434f50
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd8
ret
mov al, byte [ebp + 6]
cmp al, 2
jne 0x45bb40
mov cl, byte [esp + 0x10]
cmp cl, 8
jae 0x45bb51
cmp dl, 8
jae 0x45bb51
mov al, byte [0x4ce539]
cmp al, 8
jae 0x45bb51
cmp cl, al
je 0x45bb51
mov al, byte [ebp + 3]
and edx, 0xff
push eax
mov eax, edx
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
shl edx, 5
add edx, eax
lea eax, [eax + edx*4]
lea ecx, [eax*4 + 0x4c0ddc]
push ecx
call fcn.0045bdb0
add esp, 8
test eax, eax
je 0x45baef
lea edx, [esp + 0x18]
push eax
push edx
call fcn.0045bf90
add esp, 8
jmp 0x45bb04
mov al, byte [ebp + 3]
mov cl, byte [ebp + 2]
push eax
lea edx, [esp + 0x1c]
push ecx
push edx
call fcn.0045be40
add esp, 0xc
xor eax, eax
mov al, byte [ebp + 1]
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
shl edx, 5
add edx, eax
lea eax, [eax + edx*4]
lea edx, [esp + 0x18]
lea ecx, [eax*4 + 0x4c0dcc]
push ecx
push edx
call fcn.0045beb0
add esp, 8
mov byte [0x4cde70], 1
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd8
ret
cmp al, 4
jne 0x45bb65
push ebp
call fcn.0045c020
add esp, 4
test eax, eax
je 0x45bb65
pop edi
pop esi
pop ebp
mov byte [0x4cde70], 1
xor eax, eax
pop ebx
add esp, 0xd8
ret
mov cl, byte [0x4ce539]
cmp cl, 8
je 0x45bb77
mov al, byte [ebp + 1]
cmp al, 8
jne 0x45bb93
mov eax, dword [0x4ce53c]
test eax, eax
je 0x45bb86
push ebp
call eax
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd8
ret
cmp al, cl
jne 0x45bba4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd8
ret
xor eax, eax
mov byte [0x4cde70], 1
mov al, byte [ebp + 1]
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
shl edx, 5
add edx, eax
lea ecx, [eax + edx*4]
mov al, byte [ebp + 3]
shl ecx, 2
mov dl, al
sub dl, byte [ecx + 0x4c0dc9]
jns 0x45bbdb
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd8
ret
cmp byte [ebp + 6], 3
jne 0x45bbee
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd8
ret
cmp byte [ecx + 0x4c0dc8], 2
je 0x45bc04
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd8
ret
lea edx, [ecx + 0x4c0ddc]
mov cl, al
and ecx, 0x1f
lea esi, [ecx + ecx*2]
lea ecx, [ecx + esi*4]
shl ecx, 4
add ecx, edx
cmp byte [ecx + 3], al
jne 0x45bc2a
mov bl, byte [ecx + 6]
test bl, bl
je 0x45bc2a
test ecx, ecx
jne 0x45bc4d
and eax, 0x1f
xor ecx, ecx
mov cl, byte [ebp]
mov esi, ebp
lea edi, [eax + eax*2]
lea edi, [eax + edi*4]
shl edi, 4
add edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov cl, byte [ebp + 1]
mov eax, ecx
and eax, 0xff
lea edx, [eax + eax*2]
lea edx, [eax + edx*4]
shl edx, 5
add edx, eax
lea eax, [eax + edx*4]
mov dl, byte [ebp + 3]
cmp dl, byte [eax*4 + 0x4c0dc9]
je 0x45bd9b
mov bl, cl
mov byte [esp + 0x14], cl
mov byte [esp + 0x10], bl
mov eax, dword [esp + 0x10]
and eax, 0xff
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
shl edx, 5
add edx, eax
lea esi, [eax + edx*4]
shl esi, 2
mov al, byte [esi + 0x4c0dca]
test al, al
je 0x45bceb
mov al, byte [esi + 0x4c0dc9]
mov byte [esp + 0x10], al
xor eax, eax
mov al, byte [0x4ce539]
lea ecx, [eax + eax*2]
lea edx, [eax + ecx*4]
mov ecx, dword [esp + 0x10]
shl edx, 5
add edx, eax
push ecx
lea eax, [eax + edx*4]
lea eax, [eax*4 + 0x4c0ddc]
push eax
call fcn.0045bdb0
add esp, 8
test eax, eax
je 0x45bceb
lea edx, [esi + 0x4c0dcc]
push edx
push eax
call fcn.0045beb0
add esp, 8
mov al, byte [0x4ce539]
mov cl, byte [esi + 0x4c0dc9]
lea edx, [esp + 0x18]
mov byte [esp + 0x1e], 2
push edx
mov byte [esp + 0x1c], 8
mov byte [esp + 0x1d], al
mov byte [esp + 0x1e], bl
mov byte [esp + 0x1f], cl
mov byte [esp + 0x23], 0
call fcn.0045bde0
mov word [esp + 0x20], ax
mov al, byte [esp + 0x18]
add esp, 4
cmp al, 8
jne 0x45bd45
lea eax, [esp + 0x18]
push eax
call fcn.0045bef0
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd8
ret
xor ecx, ecx
xor esi, esi
mov cl, byte [0x4cde71]
inc ecx
test ecx, ecx
jle 0x45bd8e
mov eax, dword [esp + 0x14]
and eax, 0xff
lea edx, [eax + eax*2]
lea ecx, [eax + edx*4]
shl ecx, 5
add ecx, eax
lea eax, [eax + ecx*4]
lea edi, [eax*4 + 0x4c0dcc]
lea edx, [esp + 0x18]
push edi
push edx
call dword [0x4ce570]
xor eax, eax
add esp, 8
mov al, byte [0x4cde71]
inc esi
inc eax
cmp esi, eax
jl 0x45bd72
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xd8
ret
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xd8
ret