Function at 0x4ea260
Capabilities:
Encode data using xor

Disassembly:
sub esp, 4
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0xc]
push ebp
mov dword [esi + 0x6a], 2
cmp dword [esi + 0x66], 0x106
jae 0x4ea2a5
push esi
call fcn.004ea150
add esp, 4
mov eax, dword [esi + 0x66]
cmp eax, 0x106
jae 0x4ea29d
cmp dword [esp + 0x1c], 0
je 0x4ea44c
test eax, eax
je 0x4ea459
cmp dword [esi + 0x66], 3
jb 0x4ea2e9
mov ebx, dword [esi + 0x5e]
mov ecx, dword [esi + 0x2a]
xor eax, eax
mov edx, dword [esi + 0x3a]
mov al, byte [ecx + ebx + 2]
mov cl, byte [esi + 0x4a]
shl edx, cl
xor eax, edx
mov ecx, dword [esi + 0x36]
and eax, dword [esi + 0x46]
xor edi, edi
mov dword [esi + 0x3a], eax
mov di, word [ecx + eax*2]
mov ecx, dword [esi + 0x26]
and ecx, ebx
mov eax, dword [esi + 0x32]
mov word [eax + ecx*2], di
mov ecx, dword [esi + 0x3a]
mov ebx, dword [esi + 0x5e]
mov edx, dword [esi + 0x36]
mov word [edx + ecx*2], bx
test edi, edi
je 0x4ea31c
mov eax, dword [esi + 0x1e]
mov ecx, dword [esi + 0x5e]
sub eax, 0x106
sub ecx, edi
cmp eax, ecx
jb 0x4ea31c
cmp dword [esi + 0x7a], 2
je 0x4ea311
push edi
push esi
call fcn.004ea000
add esp, 8
mov dword [esi + 0x52], eax
mov eax, dword [esi + 0x66]
cmp dword [esi + 0x52], eax
jbe 0x4ea31c
mov dword [esi + 0x52], eax
mov eax, dword [esi + 0x52]
cmp eax, 3
jb 0x4ea3d7
sub eax, 3
push eax
mov eax, dword [esi + 0x5e]
sub eax, dword [esi + 0x62]
push eax
push esi
call fcn.004ece80
add esp, 0xc
mov edx, dword [esi + 0x52]
mov ecx, dword [esi + 0x66]
sub ecx, edx
cmp dword [esi + 0x72], edx
mov dword [esi + 0x66], ecx
jb 0x4ea3a5
cmp ecx, 3
jb 0x4ea3a5
dec edx
lea ebp, [esi + 0x2a]
mov dword [esi + 0x52], edx
mov ebx, dword [esi + 0x5e]
mov ecx, dword [ebp]
inc ebx
xor edx, edx
mov edi, dword [esi + 0x3a]
mov dword [esi + 0x5e], ebx
mov dl, byte [ecx + ebx + 2]
mov cl, byte [esi + 0x4a]
shl edi, cl
xor edx, edi
mov ecx, dword [esi + 0x36]
and edx, dword [esi + 0x46]
xor edi, edi
mov dword [esi + 0x3a], edx
mov di, word [ecx + edx*2]
mov edx, dword [esi + 0x26]
and edx, ebx
mov ecx, dword [esi + 0x32]
mov word [ecx + edx*2], di
mov edx, dword [esi + 0x5e]
mov ebx, dword [esi + 0x3a]
mov ecx, dword [esi + 0x36]
mov word [ecx + ebx*2], dx
mov ecx, dword [esi + 0x52]
dec ecx
mov dword [esi + 0x52], ecx
jne 0x4ea358
jmp 0x4ea3f4
mov ecx, dword [esi + 0x5e]
lea ebp, [esi + 0x2a]
mov dword [esi + 0x52], 0
add ecx, edx
mov ebx, dword [ebp]
add ebx, ecx
xor edx, edx
mov dword [esi + 0x5e], ecx
mov cl, byte [esi + 0x4a]
mov dl, byte [ebx]
mov dword [esi + 0x3a], edx
shl edx, cl
xor ecx, ecx
mov cl, byte [ebx + 1]
xor edx, ecx
and edx, dword [esi + 0x46]
mov dword [esi + 0x3a], edx
jmp 0x4ea3f7
lea ebp, [esi + 0x2a]
mov edx, dword [esi + 0x5e]
xor eax, eax
mov ecx, dword [ebp]
mov al, byte [ecx + edx]
push eax
push 0
push esi
call fcn.004ece80
add esp, 0xc
dec dword [esi + 0x66]
inc dword [esi + 0x5e]
test eax, eax
je 0x4ea276
mov edx, dword [esi + 0x4e]
mov eax, 0
test edx, edx
jl 0x4ea410
mov eax, dword [ebp]
add eax, edx
push 0
mov ecx, dword [esi + 0x5e]
sub ecx, edx
push ecx
push eax
push esi
call fcn.004ecc70
add esp, 0x10
mov ecx, dword [esi + 0x5e]
mov edx, dword [esi]
mov dword [esi + 0x4e], ecx
push edx
call fcn.004e9be0
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], 0
jne 0x4ea276
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov eax, 1
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edx, dword [esi + 0x4e]
mov ecx, 0
test edx, edx
jl 0x4ea46a
mov ecx, dword [esi + 0x2a]
add ecx, edx
mov eax, dword [esp + 0x1c]
sub eax, 4
cmp eax, 1
sbb eax, eax
neg eax
push eax
mov eax, dword [esi + 0x5e]
sub eax, edx
push eax
push ecx
push esi
call fcn.004ecc70
add esp, 0x10
mov ecx, dword [esi + 0x5e]
mov edx, dword [esi]
mov dword [esi + 0x4e], ecx
push edx
call fcn.004e9be0
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], 1
sbb eax, eax
pop ebp
neg eax
pop edi
pop esi
pop ebx
add esp, 4
ret