Function at 0x480610
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x3005c
call fcn.00484590
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebx]
lea edx, [eax + esi]
mov dword [esp + 0x24], eax
lea ecx, [edx - 2]
mov dword [esp + 0x5c], eax
mov dword [esp + 0x40], ecx
lea eax, [edx - 2]
lea ecx, [ebx + edi]
mov dword [esp + 0x64], eax
mov dword [esp + 0x20], ecx
lea eax, [esp + 0x68]
dec ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], ecx
xor ecx, ecx
push 0x20000
push ecx
push eax
mov dword [esp + 0x60], edi
mov dword [esp + 0x28], ecx
mov dword [esp + 0x34], edi
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x6c], edx
call sub.msvcrt.dll_memset
add esp, 0xc
test esi, esi
jne 0x4806a8
cmp ebx, 4
jb 0x480acf
mov eax, dword [ebp + 0x14]
mov dword [edi], 0xffffffff
mov dword [eax], 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp ebx, 5
jb 0x480acf
mov ebx, dword [ebp + 8]
mov dl, 1
mov byte [esp + 0xf], dl
mov al, byte [ebx]
inc ebx
mov byte [edi + 4], al
add edi, 5
mov dword [ebp + 0x10], edi
mov dword [ebp + 8], ebx
cmp ebx, dword [esp + 0x40]
jae 0x480a2f
lea eax, [edi + 4]
mov dword [esp + 0x18], eax
lea eax, [edi + 2]
mov dword [esp + 0x14], eax
lea eax, [edi + 6]
mov dword [esp + 0x10], eax
jmp 0x4806f0
cmp edi, dword [esp + 0x48]
jae 0x480a2b
mov eax, dword [esp + 0x24]
cmp eax, ebx
ja 0x480779
mov ecx, dword [esp + 0x64]
cmp eax, ecx
jb 0x480710
mov dword [esp + 0x24], ecx
jmp 0x480779
mov edx, eax
lea esi, [eax + 0x2000]
sub edx, dword [esp + 0x5c]
and edx, 0x3fff
cmp esi, ecx
jb 0x480728
mov esi, ecx
movzx ecx, byte [eax]
movzx eax, byte [eax + 1]
shl ecx, 5
xor ecx, eax
cmp dword [esp + 0x24], esi
jae 0x480775
lea ebx, [esp + 0x20068]
lea edx, [ebx + edx*4]
mov ebx, dword [esp + 0x24]
jmp 0x480750
movzx eax, byte [ebx + 2]
lea edx, [edx + 4]
shl ecx, 5
xor ecx, eax
and ecx, 0x7fff
mov eax, dword [esp + ecx*4 + 0x68]
mov dword [edx - 4], eax
mov dword [esp + ecx*4 + 0x68], ebx
inc ebx
cmp ebx, esi
jb 0x480750
mov ebx, dword [ebp + 8]
mov dword [esp + 0x24], esi
mov ecx, dword [esp + 0x60]
lea eax, [ebx - 0x2000]
shl dword [esp + 0x1c], 1
add ecx, 0xfffffffc
movzx edi, word [ebx]
mov edx, 2
mov dword [esp + 0x4c], eax
mov eax, ebx
sub eax, dword [esp + 0x5c]
and eax, 0x3fff
mov dword [esp + 0x2c], 0xb
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], edx
mov esi, dword [esp + eax*4 + 0x20068]
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x3c], esi
cmp esi, dword [esp + 0x4c]
jb 0x480851
cmp word [esi], di
jne 0x48082f
mov eax, ebx
mov edx, esi
cmp ebx, ecx
jae 0x4807f4
mov esi, dword [esp + 0x34]
jmp 0x4807e0
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x4807f0
add eax, 4
add edx, 4
cmp eax, esi
jb 0x4807e0
mov esi, dword [esp + 0x3c]
sub edx, eax
mov cl, byte [edx + eax]
mov bl, byte [eax]
inc eax
cmp eax, dword [esp + 0x60]
jae 0x480806
cmp cl, bl
je 0x4807f6
mov ebx, dword [ebp + 8]
sub eax, ebx
mov edx, dword [esp + 0x38]
dec eax
cmp eax, edx
jbe 0x480827
mov ecx, ebx
mov edx, eax
sub ecx, esi
mov dword [esp + 0x38], edx
mov dword [esp + 0x50], ecx
cmp eax, 0x30
jae 0x480851
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x34]
sub esi, dword [esp + 0x5c]
and esi, 0x3fff
sub eax, 1
mov dword [esp + 0x2c], eax
mov esi, dword [esp + esi*4 + 0x20068]
mov dword [esp + 0x3c], esi
jne 0x4807c0
mov edi, dword [ebp + 0x10]
cmp edx, 3
jae 0x480881
mov al, byte [ebx]
mov ecx, 1
mov esi, dword [esp + 0x18]
inc dword [esp + 0x14]
mov byte [edi], al
inc edi
mov eax, dword [esp + 0x10]
inc eax
mov dword [ebp + 0x10], edi
inc esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], esi
jmp 0x4809d7
lea ecx, [edx - 3]
mov edx, ecx
cmp ecx, 7
jb 0x480890
mov edx, 7
mov eax, dword [esp + 0x50]
mov esi, dword [esp + 0x18]
add esi, 2
mov dword [esp + 0x18], esi
lea eax, [eax*8 - 8]
or eax, edx
mov edx, dword [esp + 0x14]
mov word [edi], ax
add edx, 2
mov eax, dword [esp + 0x10]
add edi, 2
add eax, 2
mov dword [ebp + 0x10], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
cmp ecx, 7
jb 0x4809ce
sub ecx, 7
cmp dword [esp + 0x30], 0
je 0x480900
mov eax, ecx
cmp ecx, 0xf
jb 0x4808e6
mov eax, 0xf
mov ebx, dword [esp + 0x30]
shl al, 4
mov dword [esp + 0x30], 0
or byte [ebx], al
mov ebx, dword [ebp + 8]
mov eax, dword [esp + 0x10]
jmp 0x480933
cmp edi, dword [esp + 0x20]
jae 0x480acf
mov eax, ecx
cmp ecx, 0xf
jb 0x480916
mov eax, 0xf
mov byte [edi], al
inc edx
mov eax, dword [esp + 0x10]
mov dword [esp + 0x30], edi
inc eax
inc edi
mov dword [esp + 0x10], eax
inc esi
mov dword [ebp + 0x10], edi
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], esi
cmp ecx, 0xf
jb 0x4809ce
sub ecx, 0xf
cmp edi, dword [esp + 0x20]
jae 0x480acf
mov eax, ecx
cmp ecx, 0xff
jb 0x480958
mov eax, 0xff
mov byte [edi], al
inc edx
mov eax, dword [esp + 0x10]
inc edi
inc eax
mov dword [ebp + 0x10], edi
inc esi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], esi
cmp ecx, 0xff
jb 0x4809ce
add ecx, 0x16
cmp ecx, 0xffff
ja 0x48099f
cmp edx, dword [esp + 0x20]
ja 0x480acf
mov word [edi], cx
add eax, 2
add edi, 2
add edx, 2
add esi, 2
jmp 0x4809bf
cmp eax, dword [esp + 0x20]
ja 0x480acf
xor ebx, ebx
mov dword [edx], ecx
mov word [edi], bx
add eax, 6
mov ebx, dword [ebp + 8]
add edi, 6
add edx, 6
add esi, 6
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], eax
mov dword [ebp + 0x10], edi
or dword [esp + 0x1c], 1
mov ecx, dword [esp + 0x38]
add ebx, ecx
mov cl, byte [esp + 0xf]
inc cl
mov dword [ebp + 8], ebx
mov byte [esp + 0xf], cl
cmp cl, 0x20
jne 0x480a21
mov edx, dword [esp + 0x28]
mov ecx, dword [esp + 0x1c]
mov byte [esp + 0xf], 0
mov dword [edx], ecx
cmp esi, dword [esp + 0x20]
ja 0x480acf
add dword [esp + 0x14], 4
add eax, 4
mov dword [esp + 0x28], edi
add edi, 4
add esi, 4
mov dword [ebp + 0x10], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x18], esi
cmp ebx, dword [esp + 0x40]
jb 0x4806f0
mov dl, byte [esp + 0xf]
mov eax, dword [esp + 0x44]
cmp ebx, eax
jae 0x480a7c
mov esi, dword [esp + 0x20]
lea ecx, [edi + 4]
mov edi, edi
cmp edi, esi
jae 0x480a7a
mov al, byte [ebx]
inc dl
mov byte [edi], al
inc ecx
mov eax, dword [esp + 0x1c]
inc edi
add eax, eax
inc ebx
mov dword [esp + 0x1c], eax
cmp dl, 0x20
jne 0x480a72
mov edx, dword [esp + 0x28]
mov dword [edx], eax
xor dl, dl
cmp ecx, esi
ja 0x480acf
mov dword [esp + 0x28], edi
add edi, 4
add ecx, 4
mov eax, dword [esp + 0x44]
cmp ebx, eax
jb 0x480a40
cmp ebx, eax
jne 0x480acf
test dl, dl
je 0x480ab4
sub edi, dword [esp + 0x54]
mov ecx, 0x20
movzx eax, dl
mov edx, dword [esp + 0x1c]
sub ecx, eax
mov eax, 1
shl edx, cl
shl eax, cl
dec eax
or edx, eax
mov eax, dword [esp + 0x28]
mov dword [eax], edx
mov eax, dword [ebp + 0x14]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x28]
or edx, 0xffffffff
sub edi, dword [esp + 0x54]
mov dword [eax], edx
mov eax, dword [ebp + 0x14]
mov dword [eax], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 0xfffffffb
pop ebx
mov esp, ebp
pop ebp
ret