Function at 0x1004a800
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x10
mov edx, eax
push ebx
push esi
mov esi, eax
mov ebx, eax
shr esi, 5
inc esi
push edi
cmp eax, esi
jb 0x1004a83e
nop word [eax + eax]
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + edx - 1]
mov eax, ebx
shl eax, 5
sub edx, esi
add ecx, eax
mov eax, ebx
shr eax, 2
add ecx, eax
xor ebx, ecx
cmp edx, esi
jae 0x1004a820
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x10]
mov dword [ebp - 8], eax
mov ecx, dword [eax + 8]
mov eax, dword [eax]
dec ecx
and ecx, ebx
mov edi, dword [eax + ecx*4]
test edi, edi
je 0x1004a8d5
mov eax, dword [ebp + 0x10]
nop dword [eax]
cmp dword [edi + 0xc], eax
jne 0x1004a8cc
mov ecx, dword [ebp + 0xc]
lea edx, [edi + 0x10]
mov esi, eax
sub esi, 4
jb 0x1004a883
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x1004a88c
add ecx, 4
add edx, 4
sub esi, 4
jae 0x1004a872
cmp esi, 0xfffffffc
je 0x1004a9a5
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x1004a8c9
cmp esi, 0xfffffffd
je 0x1004a9a5
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x1004a8c9
cmp esi, 0xfffffffe
je 0x1004a9a5
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x1004a8c9
cmp esi, 0xffffffff
je 0x1004a9a5
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x1004a9a5
mov eax, dword [ebp + 0x10]
mov edi, dword [edi]
test edi, edi
jne 0x1004a860
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0x10]
lea eax, [esi + 1]
cmp eax, 0xffffffed
jbe 0x1004a8e9
push edx
call fcn.10045b70
add esp, 4
lea eax, [esi + 0x11]
push eax
push 0
push 0
push dword [ebp + 8]
call fcn.10045b20
mov edi, eax
mov eax, dword [ebp + 8]
push esi
push dword [ebp + 0xc]
mov dword [ebp - 0x10], edi
mov dword [edi + 0xc], esi
mov dword [edi + 8], ebx
mov ecx, dword [eax + 0x10]
lea eax, [edi + 0x10]
push eax
mov cl, byte [ecx + 0x14]
and cl, 3
mov byte [edi + 4], 4
mov byte [edi + 5], cl
mov byte [edi + 6], 0
call fcn.100dca90
mov eax, dword [ebp + 8]
add esp, 0x1c
mov byte [edi + esi + 0x10], 0
mov edx, dword [eax + 0x10]
mov eax, dword [edx + 8]
dec eax
and eax, ebx
lea ecx, [eax*4]
mov eax, dword [edx]
mov eax, dword [ecx + eax]
mov dword [edi], eax
mov eax, dword [edx]
mov dword [ecx + eax], edi
inc dword [edx + 4]
mov ecx, dword [edx + 8]
cmp dword [edx + 4], ecx
jbe 0x1004aa5c
cmp ecx, 0x3ffffffe
jg 0x1004aa5c
mov ebx, dword [ebp + 8]
add ecx, ecx
mov dword [ebp + 0x10], ecx
mov eax, dword [ebx + 0x10]
cmp byte [eax + 0x15], 2
je 0x1004aa5c
lea eax, [ecx + 1]
lea edi, [ecx*4]
cmp eax, 0x3fffffff
ja 0x1004a9cd
push edi
push 0
push 0
push ebx
call fcn.10045b20
mov esi, eax
add esp, 0x10
mov dword [ebp - 4], esi
jmp 0x1004a9db
mov ecx, dword [ebp - 8]
mov al, byte [edi + 5]
movzx edx, byte [ecx + 0x14]
not edx
movzx ecx, al
and edx, ecx
test dl, 3
je 0x1004aa5c
xor al, 3
mov byte [edi + 5], al
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
call fcn.10045b70
add esp, 4
mov dword [ebp - 4], eax
mov esi, eax
mov ecx, dword [ebp + 0x10]
mov ebx, dword [ebx + 0x10]
mov dword [ebp - 0xc], ebx
test ecx, ecx
jle 0x1004a9f6
shr edi, 2
xor eax, eax
mov ecx, edi
mov edi, esi
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebx + 8]
xor edi, edi
mov dword [ebp - 8], edi
test eax, eax
jle 0x1004aa3e
mov eax, dword [ebx]
mov eax, dword [eax + edi*4]
test eax, eax
je 0x1004aa2d
mov edi, dword [ebp - 4]
lea ebx, [ecx - 1]
mov ecx, dword [eax + 8]
mov esi, dword [eax]
and ecx, ebx
lea edx, [edi + ecx*4]
mov ecx, dword [edx]
mov dword [eax], ecx
mov dword [edx], eax
mov eax, esi
test esi, esi
jne 0x1004aa11
mov edi, dword [ebp - 8]
mov ebx, dword [ebp - 0xc]
mov eax, dword [ebx + 8]
inc edi
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 8], edi
cmp edi, eax
jl 0x1004aa02
mov esi, dword [ebp - 4]
push 0
shl eax, 2
push eax
push dword [ebx]
push dword [ebp + 8]
call fcn.10045b20
mov ecx, dword [ebp + 0x10]
add esp, 0x10
mov edi, dword [ebp - 0x10]
mov dword [ebx + 8], ecx
mov dword [ebx], esi
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret