Function at 0x4815f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x30054
call fcn.00485be0
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x14]
mov dword [esp + 0x30], eax
lea edx, [eax + esi]
mov dword [esp + 0x54], eax
lea ecx, [edx - 2]
mov dword [esp + 0x3c], edx
mov edi, dword [edi]
lea eax, [edx - 2]
mov dword [esp + 0x44], ecx
push 0x20000
mov dword [esp + 0x60], eax
lea eax, [esp + 0x64]
lea ecx, [edi + ebx]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x24], ecx
dec ecx
push 0
push eax
mov dword [esp + 0x54], ecx
mov dword [esp + 0x28], 0
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], 0
mov dword [esp + 0x64], edx
call sub.msvcrt.dll_memset
add esp, 0xc
test esi, esi
jne 0x48168f
cmp edi, 4
jb 0x481a89
mov eax, dword [ebp + 0x14]
mov dword [ebx], 0xffffffff
mov dword [eax], 4
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edi, 5
jb 0x481a89
mov edi, dword [ebp + 8]
mov ah, 1
mov byte [esp + 0xf], ah
mov al, byte [edi]
inc edi
mov byte [ebx + 4], al
add ebx, 5
mov dword [ebp + 0x10], ebx
mov dword [ebp + 8], edi
cmp edi, dword [esp + 0x44]
jae 0x4819e6
lea eax, [ebx + 4]
mov dword [esp + 0x18], eax
lea edx, [ebx + 6]
lea eax, [ebx + 2]
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], eax
nop
cmp ebx, dword [esp + 0x48]
jae 0x4819e2
mov ebx, dword [esp + 0x30]
cmp ebx, edi
ja 0x481746
mov eax, dword [esp + 0x5c]
cmp ebx, eax
jb 0x4816f0
mov dword [esp + 0x30], eax
jmp 0x481746
mov edx, ebx
lea esi, [ebx + 0x2000]
sub edx, dword [esp + 0x54]
and edx, 0x3fff
cmp esi, eax
jb 0x481708
mov esi, eax
movzx ecx, byte [ebx]
movzx eax, byte [ebx + 1]
shl ecx, 5
xor ecx, eax
cmp ebx, esi
jae 0x481742
lea edx, [esp + edx*4 + 0x20060]
nop
movzx eax, byte [ebx + 2]
lea edx, [edx + 4]
shl ecx, 5
xor ecx, eax
and ecx, 0x7fff
mov eax, dword [esp + ecx*4 + 0x60]
mov dword [edx - 4], eax
mov dword [esp + ecx*4 + 0x60], ebx
inc ebx
cmp ebx, esi
jb 0x481720
mov dword [esp + 0x30], esi
mov ebx, dword [esp + 0x58]
lea edx, [edi - 0x2000]
shl dword [esp + 0x1c], 1
mov eax, edi
sub eax, dword [esp + 0x54]
add ebx, 0xfffffffc
and eax, 0x3fff
mov dword [esp + 0x28], 0xb
mov ecx, 2
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ecx
mov esi, dword [esp + eax*4 + 0x20060]
mov eax, dword [esp + 0x28]
cmp esi, edx
jb 0x481808
movzx ebx, word [edi]
cmp word [esi], bx
mov ebx, dword [esp + 0x34]
jne 0x4817ea
mov eax, edi
mov edx, esi
cmp edi, ebx
jae 0x4817b0
mov edi, edi
mov ecx, dword [edx]
cmp ecx, dword [eax]
jne 0x4817b0
add eax, 4
add edx, 4
cmp eax, ebx
jb 0x4817a0
sub edx, eax
mov cl, byte [edx + eax]
mov bl, byte [eax]
inc eax
cmp eax, dword [esp + 0x58]
jae 0x4817c2
cmp cl, bl
je 0x4817b2
mov ecx, dword [esp + 0x38]
sub eax, edi
dec eax
cmp eax, ecx
jbe 0x4817e0
mov ebx, edi
mov ecx, eax
sub ebx, esi
mov dword [esp + 0x38], ecx
mov dword [esp + 0x40], ebx
cmp eax, 0x30
jae 0x48180c
mov eax, dword [esp + 0x28]
lea edx, [edi - 0x2000]
sub esi, dword [esp + 0x54]
and esi, 0x3fff
sub eax, 1
mov dword [esp + 0x28], eax
mov esi, dword [esp + esi*4 + 0x20060]
jne 0x481782
mov ebx, dword [esp + 0x40]
cmp ecx, 3
jae 0x481840
mov ebx, dword [ebp + 0x10]
mov al, byte [edi]
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
inc esi
inc dword [esp + 0x10]
mov ecx, dword [esp + 0x1c]
mov byte [ebx], al
inc ebx
inc edx
mov dword [ebp + 0x10], ebx
mov dword [esp + 0x14], esi
mov eax, 1
mov dword [esp + 0x18], edx
jmp 0x48198f
add ecx, 0xfffffffd
mov edx, ecx
cmp ecx, 7
jb 0x48184f
mov edx, 7
mov esi, dword [esp + 0x14]
lea eax, [ebx*8 - 8]
mov ebx, dword [ebp + 0x10]
or eax, edx
mov edx, dword [esp + 0x18]
add esi, 2
add dword [esp + 0x10], 2
add edx, 2
mov dword [esp + 0x14], esi
mov word [ebx], ax
add ebx, 2
mov dword [ebp + 0x10], ebx
mov dword [esp + 0x18], edx
cmp ecx, 7
jb 0x481980
sub ecx, 7
cmp dword [esp + 0x2c], 0
je 0x4818b8
mov eax, ecx
cmp ecx, 0xf
jb 0x48189e
mov eax, 0xf
mov edi, dword [esp + 0x2c]
shl al, 4
mov dword [esp + 0x2c], 0
or byte [edi], al
mov edi, dword [ebp + 8]
mov eax, dword [esp + 0x10]
jmp 0x4818eb
cmp ebx, dword [esp + 0x20]
jae 0x481a89
mov eax, ecx
cmp ecx, 0xf
jb 0x4818ce
mov eax, 0xf
mov byte [ebx], al
inc esi
mov eax, dword [esp + 0x10]
mov dword [esp + 0x2c], ebx
inc eax
inc ebx
mov dword [esp + 0x10], eax
inc edx
mov dword [ebp + 0x10], ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edx
cmp ecx, 0xf
jb 0x481980
sub ecx, 0xf
cmp ebx, dword [esp + 0x20]
jae 0x481a89
cmp ecx, 0xff
jae 0x481915
inc eax
mov byte [ebx], cl
inc ebx
mov dword [esp + 0x10], eax
inc esi
inc edx
jmp 0x481975
mov edi, dword [esp + 0x18]
lea edx, [eax + 1]
mov eax, dword [esp + 0x14]
lea esi, [ebx + 1]
add ecx, 0x16
mov byte [ebx], 0xff
inc eax
cmp ecx, 0xffff
ja 0x481951
cmp eax, dword [esp + 0x20]
ja 0x481a89
add edx, 2
mov word [esi], cx
lea ebx, [esi + 2]
mov dword [esp + 0x10], edx
lea esi, [eax + 2]
lea edx, [edi + 3]
jmp 0x481972
cmp edx, dword [esp + 0x20]
ja 0x481a89
xor ebx, ebx
mov dword [eax], ecx
add edx, 6
mov word [esi], bx
lea ebx, [esi + 6]
mov dword [esp + 0x10], edx
lea esi, [eax + 6]
lea edx, [edi + 7]
mov edi, dword [ebp + 8]
mov dword [ebp + 0x10], ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edx
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
or ecx, 1
mov dword [esp + 0x1c], ecx
add edi, eax
mov ah, byte [esp + 0xf]
inc ah
mov dword [ebp + 8], edi
mov byte [esp + 0xf], ah
cmp ah, 0x20
jne 0x4819d6
mov eax, dword [esp + 0x24]
mov dword [eax], ecx
xor ah, ah
mov byte [esp + 0xf], ah
cmp edx, dword [esp + 0x20]
ja 0x481a89
add dword [esp + 0x10], 4
add esi, 4
mov dword [esp + 0x24], ebx
add ebx, 4
add edx, 4
mov dword [ebp + 0x10], ebx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edx
cmp edi, dword [esp + 0x44]
jb 0x4816d0
jmp 0x4819e6
mov ah, byte [esp + 0xf]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x1c]
cmp edi, ecx
jae 0x481a3a
mov esi, dword [esp + 0x20]
lea ecx, [ebx + 4]
lea esp, [esp]
cmp ebx, esi
jae 0x481a89
mov al, byte [edi]
inc ah
mov byte [ebx], al
inc ecx
inc ebx
inc edi
add edx, edx
cmp ah, 0x20
jne 0x481a2e
mov eax, dword [esp + 0x24]
mov dword [eax], edx
xor ah, ah
cmp ecx, esi
ja 0x481a89
mov dword [esp + 0x24], ebx
add ebx, 4
add ecx, 4
cmp edi, dword [esp + 0x3c]
jb 0x481a00
mov ecx, dword [esp + 0x3c]
cmp edi, ecx
jne 0x481a89
test ah, ah
je 0x481a6e
sub ebx, dword [esp + 0x4c]
mov ecx, 0x20
movzx eax, ah
sub ecx, eax
mov eax, 1
shl eax, cl
dec eax
shl edx, cl
or edx, eax
mov eax, dword [esp + 0x24]
mov dword [eax], edx
mov eax, dword [ebp + 0x14]
mov dword [eax], ebx
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x24]
or edx, 0xffffffff
sub ebx, dword [esp + 0x4c]
mov dword [eax], edx
mov eax, dword [ebp + 0x14]
mov dword [eax], ebx
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