Function at 0x4b84b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x34]
cmp dword [eax], 0
je 0x4b8534
mov edi, dword [esp + 0x40]
push edi
call fcn.002f6200
add esp, 4
push edi
call fcn.002f63b0
add esp, 4
mov ebp, eax
push edi
call fcn.002f63b0
add esp, 4
mov dword [esp], eax
push edi
call fcn.002f63b0
add esp, 4
test eax, eax
je 0x4b887a
mov ebx, eax
push dword [esp + 0x3c]
push dword [esp + 0x3c]
push ebp
call fcn.004b66b0
add esp, 0xc
test eax, eax
je 0x4b887a
push ebp
call fcn.002f9920
add esp, 4
test eax, eax
je 0x4b8547
push esi
call fcn.002fabf0
add esp, 4
mov ebx, 1
jmp 0x4b887c
push esi
call fcn.002fabf0
add esp, 4
mov ebx, 1
jmp 0x4b8885
mov eax, dword [esp + 0x3c]
test byte [eax], 1
mov ecx, dword [esp]
mov dword [esp + 0xc], ebp
mov dword [esp + 4], ebx
jne 0x4b87fe
push edi
call fcn.002f63b0
add esp, 4
mov ebx, eax
push edi
call fcn.002f63b0
add esp, 4
mov dword [esp + 8], eax
push edi
call fcn.002f63b0
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
je 0x4b887a
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], 0
push edi
push 0
push 0
push 0
mov ebp, dword [esp + 0x4c]
push dword [ebp]
mov ebx, dword [esp + 0x28]
push ebx
call fcn.002fd7a0
add esp, 0x18
test eax, eax
je 0x4b887a
push ebp
push ebx
push ebx
call fcn.004b66b0
add esp, 0xc
test eax, eax
je 0x4b887a
push dword [esp]
call fcn.002fabf0
add esp, 4
push ebx
push dword [esp + 8]
call fcn.002f9c90
add esp, 8
test eax, eax
je 0x4b887a
mov ebx, dword [esp + 0x3c]
cmp dword [ebx], 2
mov eax, dword [esp]
jl 0x4b87a3
mov ecx, 1
jmp 0x4b862d
mov dword [ebx + 4], edi
push ebx
call fcn.002fa7e0
add esp, 4
mov ecx, dword [esp + 0x1c]
inc ecx
mov ebx, dword [esp + 0x3c]
cmp ecx, dword [ebx]
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x34]
mov eax, dword [esp]
jge 0x4b87a3
mov dword [esp + 0x1c], ecx
push edi
push ebx
push eax
mov ebp, eax
push eax
call fcn.004b6c80
add esp, 0x10
test eax, eax
je 0x4b887a
push edi
push ebx
push dword [esp + 0xc]
mov esi, dword [esp + 0x14]
push esi
call fcn.004b6c80
add esp, 0x10
test eax, eax
je 0x4b887a
push edi
push ebx
push dword [esp + 0x14]
push esi
mov ebx, dword [esp + 0x28]
push ebx
call fcn.004b6af0
add esp, 0x14
test eax, eax
je 0x4b887a
mov eax, dword [ebp + 4]
cmp eax, dword [ebx + 4]
mov esi, ebp
cmovl esi, ebx
mov edi, ebx
cmovl edi, ebp
push dword [esi + 4]
push ebp
call fcn.002f9cf0
add esp, 8
test eax, eax
mov ebx, 0
je 0x4b8983
cmp dword [edi + 4], 0
jle 0x4b86db
mov ecx, dword [esi]
mov edx, dword [edi]
mov ebx, dword [ebp]
xor eax, eax
nop word cs:[eax + eax]
mov ebp, dword [edx + eax*4]
xor ebp, dword [ecx + eax*4]
mov dword [ebx + eax*4], ebp
inc eax
cmp eax, dword [edi + 4]
jl 0x4b86c0
mov edi, dword [esi + 4]
cmp eax, edi
mov ebx, dword [esp]
jl 0x4b86e7
jmp 0x4b86fe
xor eax, eax
mov edi, dword [esi + 4]
cmp eax, edi
mov ebx, dword [esp]
jge 0x4b86fe
mov ecx, dword [esi]
mov edx, dword [ebx]
nop dword [eax + eax]
mov edi, dword [ecx + eax*4]
mov dword [edx + eax*4], edi
inc eax
mov edi, dword [esi + 4]
cmp eax, edi
jl 0x4b86f0
mov dword [ebx + 4], edi
push ebx
call fcn.002fa7e0
add esp, 4
mov ecx, dword [esp + 8]
mov eax, dword [ecx + 4]
mov edi, dword [esp + 0x14]
cmp eax, dword [edi + 4]
mov esi, ecx
cmovl esi, edi
cmovl edi, ecx
push dword [esi + 4]
mov ebx, dword [esp + 8]
push ebx
call fcn.002f9cf0
add esp, 8
test eax, eax
je 0x4b898c
cmp dword [edi + 4], 0
jle 0x4b8770
mov ecx, dword [esi]
mov edx, dword [edi]
mov ebx, dword [ebx]
xor eax, eax
nop word cs:[eax + eax]
mov ebp, dword [edx + eax*4]
xor ebp, dword [ecx + eax*4]
mov dword [ebx + eax*4], ebp
inc eax
cmp eax, dword [edi + 4]
jl 0x4b8750
mov edi, dword [esi + 4]
cmp eax, edi
mov ebx, dword [esp + 4]
jge 0x4b8605
jmp 0x4b8781
xor eax, eax
mov edi, dword [esi + 4]
cmp eax, edi
mov ebx, dword [esp + 4]
jge 0x4b8605
mov ecx, dword [esi]
mov edx, dword [ebx]
nop word cs:[eax + eax]
mov edi, dword [ecx + eax*4]
mov dword [edx + eax*4], edi
inc eax
mov edi, dword [esi + 4]
cmp eax, edi
jl 0x4b8790
jmp 0x4b8605
mov ebx, dword [esp + 4]
push ebx
call fcn.002f9920
add esp, 4
test eax, eax
je 0x4b87c8
mov ecx, dword [esp + 0x10]
lea eax, [ecx + 1]
cmp ecx, 0x31
mov dword [esp + 0x10], eax
jb 0x4b8598
push ebx
call fcn.002f9920
add esp, 4
test eax, eax
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp]
je 0x4b8818
call fcn.00327120
push 0x82c371
push 0x432
push 0x82c310
call fcn.00327220
add esp, 0xc
push 0
push 0x71
jmp 0x4b8870
push ebp
push ecx
call fcn.002f9c90
add esp, 8
test eax, eax
je 0x4b887a
mov ebx, dword [esp + 0x3c]
cmp dword [ebx], 3
mov ebp, dword [esp]
jge 0x4b888f
push edi
push ebx
push ebp
mov ebx, dword [esp + 0x10]
push ebx
call fcn.004b6c80
add esp, 0x10
test eax, eax
je 0x4b887a
push ebx
push ebp
push ebx
call fcn.004b6600
add esp, 0xc
test eax, eax
je 0x4b887a
push dword [esp + 0xc]
push ebx
call fcn.002fa590
add esp, 8
test eax, eax
je 0x4b8997
call fcn.00327120
push 0x82c371
push 0x43c
push 0x82c310
call fcn.00327220
add esp, 0xc
push 0
push 0x74
push 3
call fcn.00327310
add esp, 0xc
xor ebx, ebx
push edi
call fcn.002f62e0
add esp, 4
mov eax, ebx
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, 1
jmp 0x4b88ca
mov dword [ebp + 4], esi
push ebp
call fcn.002fa7e0
add esp, 4
mov esi, dword [esp + 8]
lea eax, [esi + 1]
mov ebx, dword [esp + 0x3c]
mov ecx, dword [ebx]
lea edx, [ecx - 1]
shr edx, 0x1f
add ecx, edx
dec ecx
sar ecx, 1
cmp esi, ecx
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x34]
jge 0x4b8818
mov dword [esp + 8], eax
push edi
push ebx
push ebp
push ebp
call fcn.004b6c80
add esp, 0x10
test eax, eax
je 0x4b887a
push edi
push ebx
push ebp
push ebp
call fcn.004b6c80
add esp, 0x10
test eax, eax
je 0x4b887a
mov eax, dword [ebp + 4]
mov esi, dword [esp + 0xc]
cmp eax, dword [esi + 4]
mov ebx, ebp
cmovl ebx, esi
cmovl esi, ebp
push dword [ebx + 4]
push ebp
call fcn.002f9cf0
add esp, 8
test eax, eax
je 0x4b887a
cmp dword [esi + 4], 0
jle 0x4b894f
mov ecx, dword [ebx]
mov edx, dword [esi]
mov edi, dword [ebp]
xor eax, eax
nop word cs:[eax + eax]
mov ebp, dword [edx + eax*4]
xor ebp, dword [ecx + eax*4]
mov dword [edi + eax*4], ebp
inc eax
cmp eax, dword [esi + 4]
jl 0x4b8930
mov esi, dword [ebx + 4]
cmp eax, esi
mov ebp, dword [esp]
jge 0x4b8896
jmp 0x4b895f
xor eax, eax
mov esi, dword [ebx + 4]
cmp eax, esi
mov ebp, dword [esp]
jge 0x4b8896
mov ecx, dword [ebx]
mov edx, dword [ebp]
nop word cs:[eax + eax]
mov esi, dword [ecx + eax*4]
mov dword [edx + eax*4], esi
inc eax
mov esi, dword [ebx + 4]
cmp eax, esi
jl 0x4b8970
jmp 0x4b8896
mov edi, dword [esp + 0x40]
jmp 0x4b887c
xor ebx, ebx
mov edi, dword [esp + 0x40]
jmp 0x4b887c
push dword [esp]
push esi
call fcn.002f9c90
add esp, 8
xor ebx, ebx
test eax, eax
setne bl
jmp 0x4b887c