Function at 0x12a7bb0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x15b4
call fcn.012a85c0
mov edi, edx
mov dword [esp + 0xc], ecx
mov ebx, dword [esp + 0x15cc]
mov esi, dword [esp + 0x15c8]
lea eax, [esp + 0x30]
push 0x84
push 0
push eax
call fcn.012a8870
add esp, 0xc
cmp dword [esp + 0x15d0], 0
mov dword [esp + 0x14], edi
je 0x12a7c7e
test esi, esi
mov ecx, esi
jle 0x12a83d6
xor eax, eax
cmp ecx, 1
je 0x12a7c48
mov ecx, dword [esp + 0x15c8]
and ecx, 0x7ffffffe
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
shl eax, 5
mov edx, dword [esp + 0xc]
add edx, eax
add edx, 0x8f13
xor eax, eax
nop
nop
movzx esi, byte [edx + eax - 1]
inc dword [esp + esi*4 + 0x30]
movzx esi, byte [edx + eax]
inc dword [esp + esi*4 + 0x30]
add eax, 2
cmp ecx, eax
jne 0x12a7c30
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x12a83d6
mov ecx, dword [esp + 0x14]
lea ecx, [ecx + ecx*8]
shl ecx, 5
add ecx, dword [esp + 0xc]
movzx eax, byte [eax + ecx + 0x8f12]
mov ecx, dword [esp + 0x15c8]
inc dword [esp + eax*4 + 0x30]
jmp 0x12a83d6
lea eax, [edi + edi*8]
mov dword [esp + 0x20], eax
mov ebp, eax
shl ebp, 6
test esi, esi
jle 0x12a7d79
cmp esi, 1
jne 0x12a7fce
xor eax, eax
xor ebx, ebx
mov ecx, dword [esp + 0x15c8]
test cl, 1
je 0x12a7cd1
mov ecx, dword [esp + 0xc]
add ecx, ebp
add ecx, 0x8192
movzx ecx, word [ecx + eax*2]
test cx, cx
je 0x12a7cd1
mov word [esp + ebx*4 + 0xb4], cx
mov word [esp + ebx*4 + 0xb6], ax
inc ebx
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.012a8870
add esp, 0xc
test ebx, ebx
sete byte [esp + 3]
je 0x12a7d90
xor eax, eax
cmp ebx, 1
je 0x12a7d4f
mov ecx, ebx
and ecx, 0xfffffffe
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [esp + eax*4 + 0xb4]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
movzx edx, word [esp + eax*4 + 0xb8]
movzx esi, dl
inc dword [esp + esi*4 + 0x934]
shr edx, 8
inc dword [esp + edx*4 + 0xd34]
add eax, 2
cmp ecx, eax
jne 0x12a7d10
test bl, 1
je 0x12a7d70
movzx eax, word [esp + eax*4 + 0xb4]
movzx ecx, al
inc dword [esp + ecx*4 + 0x934]
shr eax, 8
inc dword [esp + eax*4 + 0xd34]
mov eax, dword [esp + 0xd34]
jmp 0x12a7d99
lea eax, [esp + 0x934]
push 0x800
push 0
push eax
call fcn.012a8870
add esp, 0xc
xor ebx, ebx
mov byte [esp + 3], 1
xor eax, eax
mov dword [esp + 0x24], ebp
xor ecx, ecx
cmp eax, ebx
setne cl
inc ecx
mov dword [esp + 0x2c], ecx
lea eax, [ebx - 1]
mov dword [esp + 0x18], eax
mov dword [esp + 4], ebx
and ebx, 0xfffffffe
lea edi, [esp + 0xb4]
lea eax, [esp + 0x1134]
xor ecx, ecx
lea esi, [esp + 0x938]
xor edx, edx
mov dword [esp + 0x10], ebx
jmp 0x12a7dfa
inc edx
add ecx, 8
add esi, 0x400
mov eax, edi
cmp edx, dword [esp + 0x2c]
mov edi, dword [esp + 8]
je 0x12a7ef5
mov dword [esp + 0x1c], edx
mov dword [esp + 8], eax
xor ebx, ebx
xor eax, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [esp + eax*4 + 0x534], ebx
mov ebp, dword [esi + eax*4 - 4]
mov edx, ebp
and edx, ebx
xor ebp, ebx
lea edx, [edx*2]
add edx, ebp
mov dword [esp + eax*4 + 0x538], edx
mov ebx, dword [esi + eax*4]
mov ebp, ebx
and ebp, edx
xor ebx, edx
lea ebx, [ebx + ebp*2]
add eax, 2
cmp eax, 0x100
jne 0x12a7e10
cmp byte [esp + 3], 0
mov edx, dword [esp + 0x1c]
jne 0x12a7de0
mov dword [esp + 0x28], esi
cmp dword [esp + 0x18], 0
je 0x12a7eb3
xor eax, eax
nop
movzx edx, word [edi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0x534]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0x534], ebp
mov edx, dword [edi + eax*4]
mov esi, dword [esp + 8]
mov dword [esi + ebx*4], edx
movzx edx, word [edi + eax*4 + 4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0x534]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0x534], ebp
mov edx, dword [edi + eax*4 + 4]
mov dword [esi + ebx*4], edx
mov ebx, dword [esp + 0x10]
add eax, 2
cmp ebx, eax
jne 0x12a7e60
jmp 0x12a7eb5
xor eax, eax
test byte [esp + 4], 1
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x28]
je 0x12a7de0
movzx edx, word [edi + eax*4]
shr edx, cl
movzx edx, dl
mov ebx, dword [esp + edx*4 + 0x534]
lea ebp, [ebx + 1]
mov dword [esp + edx*4 + 0x534], ebp
mov eax, dword [edi + eax*4]
mov edx, dword [esp + 8]
mov dword [edx + ebx*4], eax
mov edx, dword [esp + 0x1c]
jmp 0x12a7de0
cmp dword [esp + 4], 0
mov ebx, dword [esp + 0x15cc]
mov ebp, dword [esp + 0x20]
je 0x12a82ca
mov ecx, dword [esp + 4]
cmp ecx, 1
jne 0x12a7f1e
mov word [edi], 1
jmp 0x12a81ae
movzx eax, word [edi + 4]
add word [edi], ax
cmp ecx, 3
mov ebx, ecx
jl 0x12a8035
mov eax, 2
mov ecx, 2
sub ecx, ebx
xor edx, edx
mov esi, 1
jmp 0x12a7f71
movzx edi, word [ebp + eax*4]
inc eax
add word [ebp + esi*4], di
lea edi, [ecx + esi]
inc edi
inc esi
cmp edi, 1
mov ebx, dword [esp + 4]
mov edi, dword [esp + 8]
je 0x12a8041
mov ebp, edi
movzx edi, word [edi + edx*4]
cmp eax, ebx
jge 0x12a7f85
movzx ebx, word [ebp + eax*4]
cmp di, bx
jae 0x12a7fb0
mov word [ebp + esi*4], di
mov word [ebp + edx*4], si
inc edx
cmp eax, dword [esp + 4]
jge 0x12a7fbc
cmp edx, esi
jge 0x12a7f50
movzx ebx, word [ebp + edx*4]
movzx edi, word [ebp + eax*4]
cmp bx, di
jae 0x12a7f55
jmp 0x12a7fc1
inc eax
mov word [ebp + esi*4], bx
cmp eax, dword [esp + 4]
jl 0x12a7f96
movzx ebx, word [ebp + edx*4]
add word [ebp + esi*4], bx
mov word [ebp + edx*4], si
inc edx
jmp 0x12a7f5b
mov ecx, esi
and ecx, 0x7ffffffe
mov eax, dword [esp + 0xc]
lea edx, [eax + ebp]
add edx, 0x8194
xor eax, eax
xor ebx, ebx
jmp 0x12a7ffb
add eax, 2
cmp ecx, eax
je 0x12a7c9f
movzx esi, word [edx + eax*2 - 2]
test si, si
je 0x12a8016
mov word [esp + ebx*4 + 0xb4], si
mov word [esp + ebx*4 + 0xb6], ax
inc ebx
movzx esi, word [edx + eax*2]
test si, si
je 0x12a7ff0
mov word [esp + ebx*4 + 0xb4], si
lea esi, [eax + 1]
mov word [esp + ebx*4 + 0xb6], si
inc ebx
jmp 0x12a7ff0
lea ecx, [ebx - 2]
mov word [edi + ebx*4 - 8], 0
jmp 0x12a80b8
mov word [edi + ebx*4 - 8], 0
lea edx, [ebx - 3]
mov eax, edx
test bl, 1
je 0x12a806e
movzx eax, word [edi + ebx*4 - 0xc]
movzx eax, word [edi + eax*4]
mov ecx, eax
and ecx, 1
xor eax, 1
lea eax, [eax + ecx*2]
mov word [edi + ebx*4 - 0xc], ax
lea eax, [ebx - 4]
lea ecx, [ebx - 2]
test edx, edx
je 0x12a80b8
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, word [edi + eax*4]
movzx edx, word [edi + edx*4]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov word [edi + eax*4], dx
movzx edx, word [edi + eax*4 - 4]
movzx edx, word [edi + edx*4]
mov esi, edx
and esi, 1
xor edx, 1
lea edx, [edx + esi*2]
mov word [edi + eax*4 - 4], dx
add eax, 0xfffffffe
cmp eax, 0xffffffff
jne 0x12a8080
mov dword [esp + 0x10], 1
xor edx, edx
mov eax, dword [esp + 0x18]
jmp 0x12a8106
mov ebp, dword [esp + 8]
mov edi, esi
and edi, 2
mov ebx, esi
or esi, 2
imul esi, edi
xor edi, 2
and ebx, 0xfffffffd
imul ebx, edi
add esi, ebx
inc edx
mov dword [esp + 0x10], esi
test esi, esi
mov ebx, dword [esp + 0x15cc]
mov edi, ebp
mov ebp, dword [esp + 0x20]
jle 0x12a81a3
xor esi, esi
test ecx, ecx
js 0x12a8135
nop
nop
nop
nop
movzx edi, word [edi + ecx*4]
cmp edx, edi
jne 0x12a8135
mov edi, esi
and edi, 1
xor esi, 1
lea esi, [esi + edi*2]
lea edi, [ecx - 1]
test ecx, ecx
mov ecx, edi
mov edi, dword [esp + 8]
jg 0x12a8110
mov ecx, 0xffffffff
mov edi, dword [esp + 0x10]
sub edi, esi
jle 0x12a80d0
and edi, 3
je 0x12a8168
mov ebx, dword [esp + 8]
lea ebp, [ebx + eax*4]
xor ebx, ebx
nop
nop
nop
nop
nop
mov word [ebp], dx
inc ebx
add ebp, 0xfffffffc
cmp edi, ebx
jne 0x12a8150
mov ebp, dword [esp + 0x10]
mov edi, ebp
sub edi, ebx
sub eax, ebx
jmp 0x12a816e
mov ebp, dword [esp + 0x10]
mov edi, ebp
mov ebx, esi
sub ebx, ebp
cmp ebx, 0xfffffffc
mov ebp, dword [esp + 8]
ja 0x12a80d4
nop
mov word [ebp + eax*4], dx
mov word [ebp + eax*4 - 4], dx
mov word [ebp + eax*4 - 8], dx
mov word [ebp + eax*4 - 0xc], dx
add edi, 0xfffffffc
add eax, 0xfffffffc
cmp edi, esi
jg 0x12a8180
jmp 0x12a80d4
cmp dword [esp + 4], 0
jle 0x12a82ca
mov eax, dword [esp + 4]
and eax, 3
xor ecx, ecx
cmp dword [esp + 0x18], 3
jb 0x12a81fa
mov edx, dword [esp + 4]
and edx, 0xfffffffc
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [edi + ecx*4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 4]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 8]
inc dword [esp + esi*4 + 0x30]
movzx esi, word [edi + ecx*4 + 0xc]
inc dword [esp + esi*4 + 0x30]
add ecx, 4
cmp edx, ecx
jne 0x12a81d0
test eax, eax
je 0x12a821d
lea ecx, [edi + ecx*4]
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx esi, word [ecx + edx*4]
inc dword [esp + esi*4 + 0x30]
inc edx
cmp eax, edx
jne 0x12a8210
cmp dword [esp + 4], 2
jl 0x12a82ca
cmp ebx, 0x20
jge 0x12a828c
mov eax, dword [esp + ebx*4 + 0x30]
mov edx, ebx
neg edx
mov ecx, ebx
and edx, 3
je 0x12a824c
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
inc ecx
mov dword [esp + ebx*4 + 0x30], eax
dec edx
jne 0x12a8240
lea edx, [ebx - 0x1d]
cmp edx, 3
jb 0x12a8288
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
add eax, dword [esp + ecx*4 + 0x34]
mov dword [esp + ebx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x38]
mov dword [esp + ebx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x3c]
mov dword [esp + ebx*4 + 0x30], eax
add eax, dword [esp + ecx*4 + 0x40]
add ecx, 4
mov dword [esp + ebx*4 + 0x30], eax
cmp ecx, 0x20
jne 0x12a8260
test ebx, ebx
jle 0x12a82ba
xor eax, eax
mov edx, ebx
mov esi, dword [esp + edx*4 + 0x30]
mov ecx, ebx
sub ecx, edx
shl esi, cl
add eax, esi
mov ecx, edx
not ecx
lea edx, [ecx + edx*2]
test edx, edx
jg 0x12a8290
mov edx, 1
mov ecx, ebx
shl edx, cl
cmp eax, edx
jne 0x12a851d
jmp 0x12a82ca
mov edx, 1
mov ecx, ebx
shl edx, cl
xor eax, eax
jmp 0x12a851d
shl ebp, 5
mov esi, dword [esp + 0xc]
lea eax, [esi + ebp]
add eax, 0x8f12
push 0x120
push 0
push eax
call fcn.012a8870
add esp, 0xc
mov eax, dword [esp + 0x24]
add eax, esi
add eax, 0x8852
push 0x240
push 0
push eax
call fcn.012a8870
add esp, 0xc
test ebx, ebx
jle 0x12a83cf
add edi, 0xfffffffe
mov eax, 1
add ebp, dword [esp + 0xc]
mov dword [esp + 8], edi
jmp 0x12a8335
mov esi, dword [esp + 4]
mov dword [esp + 4], esi
lea ecx, [eax + 1]
cmp eax, ebx
mov eax, ecx
je 0x12a83cf
mov ecx, dword [esp + eax*4 + 0x30]
test ecx, ecx
jle 0x12a8320
mov edx, ecx
and edx, 3
je 0x12a8380
mov esi, dword [esp + 4]
lea edi, [edi + esi*4]
xor esi, esi
nop
nop
nop
movzx ebx, word [edi]
mov byte [ebx + ebp + 0x8f12], al
inc esi
add edi, 0xfffffffc
cmp edx, esi
jne 0x12a8350
sub dword [esp + 4], esi
mov edx, ecx
sub edx, esi
mov ebx, dword [esp + 0x15cc]
mov edi, dword [esp + 8]
jmp 0x12a8382
mov edx, ecx
cmp ecx, 4
mov esi, dword [esp + 4]
jb 0x12a8324
dec edx
nop
nop
nop
nop
movzx ecx, word [edi + esi*4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 4]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 8]
mov byte [ecx + ebp + 0x8f12], al
movzx ecx, word [edi + esi*4 - 0xc]
add esi, 0xfffffffc
mov byte [ecx + ebp + 0x8f12], al
add edx, 0xfffffffc
cmp edx, 0xfffffffe
jb 0x12a8390
jmp 0x12a8324
mov ecx, dword [esp + 0x15c8]
mov dword [esp + 0x938], 0
cmp ebx, 2
jl 0x12a843d
lea ecx, [ebx - 1]
cmp ebx, 2
jne 0x12a83f7
xor eax, eax
mov edx, 2
jmp 0x12a8424
mov ebx, ecx
and ebx, 0xfffffffe
xor eax, eax
xor edx, edx
add eax, dword [esp + edx*4 + 0x34]
add eax, eax
mov dword [esp + edx*4 + 0x93c], eax
add eax, dword [esp + edx*4 + 0x38]
add eax, eax
mov dword [esp + edx*4 + 0x940], eax
add edx, 2
cmp ebx, edx
jne 0x12a8400
add edx, 2
test cl, 1
mov ecx, dword [esp + 0x15c8]
je 0x12a843d
add eax, dword [esp + edx*4 + 0x2c]
add eax, eax
mov dword [esp + edx*4 + 0x934], eax
test ecx, ecx
jle 0x12a8512
xor eax, eax
mov edx, dword [esp + 0x14]
lea edi, [edx + edx*8]
mov edx, edi
shl edx, 5
mov esi, dword [esp + 0xc]
add edx, esi
shl edi, 6
add edi, esi
mov dword [esp + 8], edi
jmp 0x12a848c
mov ecx, dword [esp + 8]
mov word [ecx + eax*2 + 0x8852], di
mov ecx, dword [esp + 0x15c8]
inc eax
cmp eax, ecx
je 0x12a8512
movzx ebx, byte [eax + edx + 0x8f12]
test ebx, ebx
je 0x12a8483
mov ecx, dword [esp + ebx*4 + 0x934]
lea edi, [ecx + 1]
mov dword [esp + ebx*4 + 0x934], edi
xor edi, edi
cmp bl, 4
jb 0x12a84ef
mov ebp, ebx
and ebp, 0xfffffffc
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
shl esi, 2
lea esi, [esi + edi*8]
mov edi, ecx
and edi, 2
or edi, esi
mov esi, ecx
shr esi, 2
and esi, 1
or esi, edi
mov edi, ecx
shr edi, 3
and edi, 1
lea edi, [edi + esi*2]
shr ecx, 4
add ebp, 0xfffffffc
jne 0x12a84c0
and ebx, 3
je 0x12a8470
nop
nop
nop
nop
nop
nop
nop
nop
mov esi, ecx
and esi, 1
lea edi, [esi + edi*2]
shr ecx, 1
dec ebx
jne 0x12a8500
jmp 0x12a8470
add esp, 0x15b4
pop esi
pop edi
pop ebx
pop ebp
ret
dec dword [esp + ebx*4 + 0x30]
mov ecx, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
cmp ecx, 2
jl 0x12a8548
mov esi, dword [esp + ecx*4 + 0x2c]
dec ecx
test esi, esi
je 0x12a8530
dec esi
mov dword [esp + ecx*4 + 0x30], esi
add dword [esp + ecx*4 + 0x34], 2
dec eax
cmp eax, edx
jne 0x12a851d
jmp 0x12a82ca