Function at 0x1002dbb0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x254
mov eax, dword [0x1007b6c0]
xor eax, esp
mov dword [esp + 0x250], eax
mov ecx, dword [esp + 0x258]
xor edx, edx
push ebp
mov dword [esp + 0x38], 0
cmp dword [ecx], 1
mov eax, dword [ecx + 0xc]
mov ebp, dword [ecx + 8]
mov dword [esp + 0x34], eax
jne 0x1002e703
mov ecx, dword [ecx + 4]
push ebx
mov dword [esp + 0x24], ecx
mov eax, dword [ecx + 4]
mov dword [ebp + 0x84], eax
mov ebx, dword [ebp + 0x84]
mov eax, dword [ecx + 8]
add ebx, 0x1f
sar ebx, 5
mov dword [ebp + 0x88], eax
mov dword [esp + 0x10], ebx
lea eax, [ebx*8]
push eax
push dword [ebp + 0xc8]
call fcn.10050640
add esp, 8
mov dword [ebp], eax
test eax, eax
jne 0x1002dc3a
mov ecx, 0x3e9
jmp 0x1002e38c
push esi
push edi
xor esi, esi
lea eax, [ebx*4 + 8]
lea edi, [ebp + 4]
jmp 0x1002dc50
push eax
push dword [ebp + 0xc8]
call fcn.10050640
add esp, 8
mov dword [edi], eax
test eax, eax
je 0x1002e6f9
inc esi
lea eax, [ebx*4 + 8]
add edi, 4
cmp esi, 0x20
jl 0x1002dc50
push 0x37
call fcn.1003b3c0
mov dword [ebp + 0xc4], eax
add esp, 4
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 8]
test ecx, ecx
jne 0x1002e290
mov eax, dword [eax + 0xc]
mov esi, dword [ebp + 0x84]
mov dword [esp + 0x3c], eax
mov eax, esi
mov dword [esp + 0x38], esi
and eax, 0x8000001f
jns 0x1002dcb7
dec eax
or eax, 0xffffffe0
inc eax
mov dword [esp + 0x28], eax
lea eax, [esi + 0x1f]
sar eax, 5
mov dword [esp + 0x30], eax
shl eax, 2
push eax
push dword [esp + 0x44]
call fcn.10050640
mov edi, eax
add esp, 8
test edi, edi
jne 0x1002dce9
mov ecx, 0x3e9
mov dword [esp + 0x14], ecx
jmp 0x1002e22d
lea eax, [esi - 1]
mov dword [esp + 0x4c], 1
cdq
and edx, 0x1f
mov dword [esp + 0x44], esi
add eax, edx
xor edx, edx
sar eax, 5
shl eax, 2
mov dword [esp + 0x50], eax
mov dword [esp + 0x14], edx
mov dword [eax + edi], 0
mov eax, esi
cdq
and edx, 0x1f
add edx, eax
mov eax, dword [esp + 0x28]
mov ecx, eax
sar edx, 5
shl dword [esp + 0x4c], cl
mov dword [esp + 0x2c], edx
test ebx, ebx
jle 0x1002dd58
mov esi, dword [esp + 0x3c]
mov ecx, edi
sub esi, edi
mov edx, ebx
lea esp, [esp]
mov eax, dword [esi + ecx]
lea ecx, [ecx + 4]
mov dword [ecx - 4], eax
dec edx
jne 0x1002dd40
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
test eax, eax
je 0x1002dd64
mov eax, dword [esp + 0x4c]
dec eax
and dword [edi + edx*4], eax
mov eax, esi
lea ecx, [esi + esi]
cdq
and edx, 3
add eax, edx
and eax, 0xfffffffc
sub ecx, eax
mov dword [esp + 0x58], eax
lea eax, [ecx - 1]
mov ecx, eax
and ecx, 0x80000003
jns 0x1002dd8a
dec ecx
or ecx, 0xfffffffc
inc ecx
cdq
jne 0x1002dd98
and edx, 3
add eax, edx
sar eax, 2
dec eax
jmp 0x1002dda0
and edx, 3
add eax, edx
sar eax, 2
mov dword [ebp + 0xbc], eax
inc eax
lea eax, [eax + eax*2]
shl eax, 6
push eax
push dword [ebp + 0xc8]
call fcn.10050640
mov ecx, eax
add esp, 8
mov dword [ebp + 0xc0], ecx
test ecx, ecx
jne 0x1002ddd6
mov ecx, 0x3e9
mov dword [esp + 0x14], ecx
jmp 0x1002e22d
mov eax, dword [ebp + 0xbc]
inc eax
lea eax, [eax + eax*2]
shl eax, 6
push eax
push 0
push ecx
call fcn.100506f0
xor eax, eax
add esp, 0xc
mov dword [esp + 0x1c], eax
cmp dword [ebp + 0xbc], eax
jl 0x1002e1f7
xor edx, edx
mov dword [esp + 0x14], edx
jmp 0x1002de10
mov ecx, dword [ebp + 0xc0]
lea edx, [eax + eax*2]
mov eax, dword [ebp + 0xc8]
shl edx, 6
mov dword [esp + 0x54], edx
mov dword [ecx + edx + 8], eax
mov dword [ecx + edx + 4], 0
mov dword [ecx + edx], 0
mov ecx, dword [esp + 0x30]
mov esi, dword [ebp + 0xc0]
add esi, edx
lea eax, [ecx*4]
push eax
push dword [esi + 8]
call fcn.10050640
add esp, 8
mov dword [esi + 4], eax
test eax, eax
je 0x1002e282
mov ecx, dword [esp + 0x50]
mov dword [eax + ecx], 0
xor ecx, ecx
mov eax, dword [esp + 0x38]
mov dword [esi], eax
test ebx, ebx
jle 0x1002de9a
mov edx, dword [esp + 0x54]
mov edi, edi
mov eax, dword [ebp + 0xc0]
mov eax, dword [eax + edx + 4]
mov dword [eax + ecx*4], 0
inc ecx
cmp ecx, ebx
jl 0x1002de80
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x1c]
xor ecx, ecx
mov dword [esp + 0x24], ecx
test edx, edx
jne 0x1002df8c
mov ecx, eax
mov dword [esp + 0x10], 1
sub ecx, dword [esp + 0x58]
mov eax, 1
shl eax, cl
mov dword [esp + 0x24], ecx
mov dword [esp + 0x34], eax
cmp eax, 1
jle 0x1002df83
mov ebx, 0xc
jmp 0x1002dee0
mov ecx, dword [ebp + 0xc0]
mov eax, dword [ebp + 0xc8]
mov dword [ecx + ebx + 8], eax
mov dword [ecx + ebx + 4], 0
mov dword [ecx + ebx], 0
mov ecx, dword [esp + 0x30]
mov esi, dword [ebp + 0xc0]
lea eax, [ecx*4]
push eax
push dword [esi + ebx + 8]
call fcn.10050400
add esp, 8
mov dword [esi + ebx + 4], eax
test eax, eax
je 0x1002e270
mov ecx, dword [esp + 0x50]
mov dword [eax + ecx], 0
mov eax, dword [esp + 0x38]
mov dword [esi + ebx], eax
mov ecx, dword [ebp + 0xc0]
mov eax, dword [ecx]
cmp eax, dword [ecx + ebx]
jne 0x1002e261
add eax, 0x1f
sar eax, 5
shl eax, 2
push eax
push dword [ecx + 4]
push dword [ecx + ebx + 4]
call fcn.100506d0
mov eax, dword [esp + 0x1c]
add esp, 0xc
inc eax
add ebx, 0xc
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x34]
jl 0x1002dee0
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
cmp ecx, 4
jge 0x1002e1de
mov eax, 1
rol eax, cl
mov ecx, edx
shl ecx, 4
mov dword [esp + 0x20], eax
mov dword [esp + 0x5c], ecx
add eax, ecx
mov ecx, dword [ebp + 0xc0]
lea ebx, [eax + eax*2]
mov eax, dword [ebp + 0xc8]
shl ebx, 2
mov dword [ecx + ebx + 8], eax
mov dword [ecx + ebx + 4], 0
mov dword [ecx + ebx], 0
mov ecx, dword [esp + 0x30]
mov esi, dword [ebp + 0xc0]
lea eax, [ecx*4]
push eax
push dword [esi + ebx + 8]
call fcn.10050640
add esp, 8
mov dword [esi + ebx + 4], eax
test eax, eax
je 0x1002e270
mov ecx, dword [esp + 0x50]
mov dword [eax + ecx], 0
mov ecx, dword [esp + 0x38]
mov dword [esi + ebx], ecx
mov eax, dword [ebp + 0xc0]
cmp ecx, dword [eax + ebx]
jne 0x1002e261
mov edx, dword [esp + 0x30]
lea ecx, [edx*4]
push ecx
push edi
push dword [eax + ebx + 4]
call fcn.100506d0
add esp, 0xc
mov dword [esp + 0x48], 1
cmp dword [esp + 0x20], 1
jle 0x1002e0fd
mov eax, dword [esp + 0x54]
add eax, 0xc
add ebx, 0xc
mov dword [esp + 0x10], eax
mov dword [esp + 0x34], ebx
mov ecx, dword [ebp + 0xc0]
mov eax, dword [ebp + 0xc8]
mov dword [ecx + ebx + 8], eax
mov dword [ecx + ebx + 4], 0
mov dword [ecx + ebx], 0
mov ecx, dword [esp + 0x30]
mov esi, dword [ebp + 0xc0]
lea eax, [ecx*4]
push eax
push dword [esi + ebx + 8]
call fcn.10050640
add esp, 8
mov dword [esi + ebx + 4], eax
test eax, eax
je 0x1002e270
mov ecx, dword [esp + 0x50]
mov dword [eax + ecx], 0
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x10]
mov dword [esi + ebx], eax
mov eax, dword [ebp + 0xc0]
lea esi, [eax + ebx]
lea ebx, [eax + ecx]
mov eax, dword [esp + 0x30]
dec eax
js 0x1002e0d8
mov ecx, dword [ebx + 4]
mov edx, dword [ecx + eax*4]
mov ecx, dword [esi + 4]
xor edx, dword [edi + eax*4]
mov dword [ecx + eax*4], edx
dec eax
jns 0x1002e0c2
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x48]
add ecx, 0xc
mov ebx, dword [esp + 0x34]
inc eax
add ebx, 0xc
mov dword [esp + 0x48], eax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x10], ecx
cmp eax, dword [esp + 0x20]
jl 0x1002e050
mov ebx, dword [esp + 0x18]
xor edx, edx
xor esi, esi
test ebx, ebx
jle 0x1002e125
lea esp, [esp]
mov ecx, dword [edi + esi*4]
lea eax, [ecx + ecx]
or eax, edx
mov edx, ecx
mov dword [edi + esi*4], eax
inc esi
shr edx, 0x1f
cmp esi, ebx
jl 0x1002e110
cmp dword [esp + 0x28], 0
jne 0x1002e135
test edx, edx
jne 0x1002e142
jmp 0x1002e1be
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x4c]
test dword [edi + eax*4], ecx
je 0x1002e1be
xor edx, edx
test ebx, ebx
jle 0x1002e1be
mov esi, dword [esp + 0x3c]
cmp ebx, 4
jb 0x1002e1a1
lea eax, [ebx - 1]
lea eax, [esi + eax*4]
lea ecx, [ebx - 1]
lea ecx, [edi + ecx*4]
cmp edi, eax
ja 0x1002e165
cmp ecx, esi
jae 0x1002e1a1
mov eax, ebx
and eax, 0x80000003
jns 0x1002e173
dec eax
or eax, 0xfffffffc
inc eax
mov ecx, ebx
sub ecx, eax
mov eax, edi
sub esi, edi
jmp 0x1002e180
movdqu xmm1, xmmword [eax + esi]
add edx, 4
lea eax, [eax + 0x10]
movdqu xmm0, xmmword [eax - 0x10]
pxor xmm1, xmm0
movdqu xmmword [eax - 0x10], xmm1
cmp edx, ecx
jl 0x1002e180
mov esi, dword [esp + 0x3c]
cmp edx, ebx
jge 0x1002e1be
mov ebx, esi
lea ecx, [edi + edx*4]
mov esi, dword [esp + 0x18]
sub ebx, edi
sub esi, edx
mov eax, dword [ecx + ebx]
lea ecx, [ecx + 4]
xor dword [ecx - 4], eax
dec esi
jne 0x1002e1b2
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
inc ecx
rol eax, 1
cmp ecx, 4
mov dword [esp + 0x24], ecx
mov ecx, dword [esp + 0x5c]
mov dword [esp + 0x20], eax
jl 0x1002dfa0
mov eax, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
inc eax
mov dword [esp + 0x1c], eax
cmp eax, dword [ebp + 0xbc]
jle 0x1002de10
xor ecx, ecx
cmp ebx, 6
mov dword [ebp + 0xb0], 0x1002e8a0
mov eax, 0x1002be60
mov dword [ebp + 0xb4], 0x1002a7c0
mov edx, 0x1003b7b0
mov dword [ebp + 0xb8], fcn.1002bb00
cmove eax, edx
mov dword [ebp + 0xac], eax
test edi, edi
je 0x1002e38a
mov eax, dword [esp + 0x44]
add eax, 0x1f
sar eax, 5
shl eax, 2
push eax
push 0
push edi
call fcn.100506f0
push edi
push dword [esp + 0x50]
call fcn.10050630
mov ecx, dword [esp + 0x28]
add esp, 0x14
jmp 0x1002e38a
mov ebx, dword [esp + 0x18]
mov ecx, 0x3ea
mov dword [esp + 0x14], ecx
jmp 0x1002e1f9
mov ebx, dword [esp + 0x18]
mov ecx, 0x3e9
mov dword [esp + 0x14], ecx
jmp 0x1002e1f9
mov ecx, 0x3e9
mov dword [esp + 0x14], ecx
jmp 0x1002e1f9
cmp ecx, 1
jne 0x1002e3a5
mov esi, dword [eax + 0xc]
mov ecx, 0x1002b0c0
mov eax, dword [ebp + 0x84]
cdq
sub eax, edx
mov edx, 0x1002a5b0
sar eax, 1
cmp esi, eax
cmovg ecx, edx
mov dword [ebp + 0xb4], ecx
mov dword [ebp + 0x8c], esi
mov esi, dword [ebp + 0x84]
add esi, 0x20
sar esi, 5
lea eax, [esi + esi*2]
lea edi, [eax*4 + 4]
push edi
push dword [ebp + 0xc8]
call fcn.10050640
add esp, 8
mov dword [ebp + 0x90], eax
test eax, eax
je 0x1002e6f9
push edi
push dword [ebp + 0xc8]
call fcn.10050640
add esp, 8
mov dword [ebp + 0x94], eax
test eax, eax
je 0x1002e6f9
shl esi, 2
push esi
push dword [ebp + 0xc8]
call fcn.10050640
add esp, 8
mov dword [ebp + 0x98], eax
test eax, eax
je 0x1002e6f9
push esi
push dword [ebp + 0xc8]
call fcn.10050640
add esp, 8
mov dword [ebp + 0x9c], eax
test eax, eax
je 0x1002e6f9
mov ecx, dword [ebp + 0x84]
mov eax, 0x1002be60
add ecx, 0x1f
mov dword [ebp + 0xb0], 0x1002e8a0
and ecx, 0xffffffe0
mov dword [ebp + 0xb8], 0x1002e970
cmp ecx, 0xc0
mov edx, 0x1003b7b0
cmove eax, edx
mov dword [ebp + 0xac], eax
xor ecx, ecx
pop edi
pop esi
pop ebx
mov eax, ecx
pop ebp
mov ecx, dword [esp + 0x250]
xor ecx, esp
call fcn.10052dd6
add esp, 0x254
ret
cmp ecx, 8
jne 0x1002e388
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 0x10]
mov ebx, dword [ebp + 0x84]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x24], ebx
cmp edx, ecx
jge 0x1002e3d4
mov eax, edx
mov dword [esp + 0x1c], ecx
mov edx, ecx
mov dword [esp + 0x20], eax
mov ecx, eax
add ebx, 0x20
mov dword [ebp + 0x8c], edx
sar ebx, 5
mov dword [ebp + 0x90], ecx
mov dword [esp + 0x2c], ebx
lea eax, [ebx + ebx*2]
lea esi, [eax*4 + 4]
push esi
push dword [ebp + 0xc8]
call fcn.10050640
add esp, 8
mov dword [ebp + 0x94], eax
test eax, eax
je 0x1002e6f9
push esi
push dword [ebp + 0xc8]
call fcn.10050640
add esp, 8
mov dword [ebp + 0x98], eax
test eax, eax
je 0x1002e6f9
lea esi, [ebx*4]
push esi
push dword [ebp + 0xc8]
mov dword [esp + 0x5c], esi
call fcn.10050640
add esp, 8
mov dword [ebp + 0x9c], eax
test eax, eax
je 0x1002e6f9
push esi
push dword [ebp + 0xc8]
call fcn.10050640
add esp, 8
mov dword [ebp + 0xa0], eax
test eax, eax
je 0x1002e6f9
lea eax, [ebx + 1]
lea edi, [eax*4]
mov dword [esp + 0x40], eax
mov esi, edi
mov dword [esp + 0x5c], edi
shl esi, 8
push esi
push dword [ebp + 0xc8]
call fcn.10050640
add esp, 8
mov dword [ebp + 0xa4], eax
test eax, eax
je 0x1002e6f9
push esi
push 0
push eax
call fcn.100506f0
push edi
push dword [ebp + 0xc8]
call fcn.10050640
mov edi, eax
add esp, 0x14
mov dword [esp + 0x28], edi
test edi, edi
je 0x1002e6f9
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov word [esp + 0x60], ax
mov dword [esp + 0x10], eax
and ecx, 0x8000001f
jns 0x1002e4e9
dec ecx
or ecx, 0xffffffe0
inc ecx
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x20]
and ecx, 0x8000001f
jns 0x1002e4fe
dec ecx
or ecx, 0xffffffe0
inc ecx
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x24]
and ecx, 0x8000001f
jns 0x1002e513
dec ecx
or ecx, 0xffffffe0
inc ecx
mov dword [esp + 0x48], ecx
mov esi, 1
lea esp, [esp]
test eax, eax
jne 0x1002e591
push dword [esp + 0x5c]
push eax
push edi
call fcn.100506f0
mov eax, dword [esp + 0x28]
add esp, 0xc
mov ecx, dword [esp + 0x58]
cdq
and edx, 0x1f
mov dword [edi], 3
add eax, edx
sar eax, 5
lea edx, [edi + eax*4]
mov eax, 1
shl eax, cl
or dword [edx], eax
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x34]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
lea edx, [edi + eax*4]
mov eax, 1
shl eax, cl
or dword [edx], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x48]
cdq
and edx, 0x1f
add eax, edx
sar eax, 5
lea edx, [edi + eax*4]
mov eax, 1
shl eax, cl
or dword [edx], eax
jmp 0x1002e59f
push edi
lea ecx, [ebx + 1]
push ecx
push edi
call fcn.1002b4a0
add esp, 0xc
movzx ecx, byte [edi]
lea eax, [ebx + 1]
mov word [esp + esi*2 + 0x60], cx
mov edx, ebx
imul ecx, eax
mov eax, dword [ebp + 0xa4]
lea eax, [eax + ecx*4]
test ebx, ebx
js 0x1002e5db
lea ecx, [ebx*4]
mov ebx, edi
add ecx, eax
sub ebx, eax
lea esp, [esp]
dec edx
mov eax, dword [ebx + ecx]
mov dword [ecx], eax
lea ecx, [ecx - 4]
jns 0x1002e5d0
mov ebx, 1
mov dword [esp + 0x3c], esi
cmp esi, ebx
jle 0x1002e66f
mov ecx, dword [esp + 0x10]
mov eax, ebx
rol eax, cl
mov dword [esp + 0x44], eax
jmp 0x1002e600
movsx eax, word [esp + ebx*2 + 0x60]
imul eax, dword [esp + 0x40]
mov edx, dword [ebp + 0xa4]
mov ecx, dword [edx + eax*4]
lea esi, [edx + eax*4]
xor ecx, dword [edi]
mov eax, dword [esp + 0x44]
and ecx, 0xff
or eax, ebx
mov word [esp + eax*2 + 0x60], cx
imul ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x2c]
lea edi, [edx + ecx*4]
mov edx, eax
test eax, eax
js 0x1002e660
mov eax, dword [esp + 0x28]
sub esi, eax
mov ecx, dword [esp + 0x54]
add ecx, eax
sub edi, eax
lea esp, [esp]
mov eax, dword [esi + ecx]
lea ecx, [ecx - 4]
xor eax, dword [ecx + 4]
dec edx
mov dword [edi + ecx + 4], eax
jns 0x1002e650
mov edi, dword [esp + 0x28]
inc ebx
cmp ebx, dword [esp + 0x3c]
jl 0x1002e600
mov esi, dword [esp + 0x44]
mov eax, dword [esp + 0x10]
mov ebx, dword [esp + 0x2c]
inc eax
rol esi, 1
mov dword [esp + 0x10], eax
cmp eax, 8
jl 0x1002e520
mov eax, dword [esp + 0x24]
mov edx, 0x1002be60
mov esi, 0x1003b7b0
mov dword [ebp + 0xb0], 0x1002e8a0
lea ecx, [eax + 0x1f]
and ecx, 0xffffffe0
cmp ecx, 0xc0
cmove edx, esi
mov dword [ebp + 0xac], edx
cdq
sub eax, edx
sar eax, 1
cmp dword [esp + 0x1c], eax
jg 0x1002e6d1
cmp dword [esp + 0x20], eax
jg 0x1002e6d1
mov dword [ebp + 0xb4], 0x1002aaf0
jmp 0x1002e6db
mov dword [ebp + 0xb4], 0x1002a260
push edi
push dword [ebp + 0xc8]
mov dword [ebp + 0xb8], 0x1002d150
call fcn.10050630
add esp, 8
jmp 0x1002e388
mov ecx, 0x3e9
jmp 0x1002e38a
mov ecx, 0x3f1
mov eax, ecx
mov ecx, dword [esp + 0x254]
pop ebp
xor ecx, esp
call fcn.10052dd6
add esp, 0x254
ret