Function at 0x542834
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
push ebx
push esi
push edi
mov eax, dword [ecx + 0xb8]
mov edx, dword [0x52cfc4]
add edx, eax
mov dword [ebp - 0xc], edx
mov edx, dword [0x52cfc8]
mov ebx, dword [ebp + 8]
xor esi, esi
inc edx
mov dword [ebp - 0x14], edx
mov edx, dword [0x52cfcc]
inc edx
mov dword [ebp - 0x2c], edx
mov edx, dword [0x52cfd0]
inc edx
mov dword [ebp - 4], edx
mov edx, dword [0x52cfd4]
inc edx
mov dword [ebp - 8], edx
mov edx, dword [0x52cfd8]
inc edx
mov dword [ebp - 0x24], edx
mov edx, dword [0x52cfdc]
inc edx
sub ebx, esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x28], edx
je 0x542a18
dec ebx
je 0x5429e4
dec ebx
je 0x542936
dec ebx
je 0x5428f5
dec ebx
jne 0x542a49
cmp dword [ecx + 0x5fa4], esi
je 0x542a49
mov ebx, dword [ecx + 0x5fbc]
xor edi, edi
cmp eax, esi
jle 0x542a4f
mov edx, dword [ecx + 0x20c4]
add edx, 0x1c
mov al, byte [edx]
mov byte [esi + ebx], al
movsx eax, al
add edi, eax
inc esi
add edx, 0x104
cmp esi, dword [ecx + 0xb8]
jl 0x5428d7
jmp 0x542a4f
mov ebx, dword [ecx + 0x2128]
xor edi, edi
cmp eax, esi
jle 0x542a4f
mov edx, dword [ecx + 0x20c4]
add edx, 0x64
mov eax, dword [edx]
and al, 0xf
dec al
neg al
sbb al, al
inc al
mov byte [esi + ebx], al
movsx eax, al
add edi, eax
inc esi
add edx, 0x104
cmp esi, dword [ecx + 0xb8]
jl 0x54290e
jmp 0x542a4f
mov ebx, dword [ecx + 0x3b68]
xor edi, edi
cmp dword [ecx + 0x5fa4], esi
je 0x5429b4
cmp dword [ecx + 0x98], esi
jne 0x542981
cmp eax, esi
jle 0x542a4f
mov edx, dword [ecx + 0x20c4]
add edx, 0x59
cmp byte [edx], 1
sete al
mov byte [esi + ebx], al
movsx eax, al
add edi, eax
inc esi
add edx, 0x104
cmp esi, dword [ecx + 0xb8]
jl 0x54295f
jmp 0x542a4f
cmp eax, esi
jle 0x542a4f
mov edx, dword [ecx + 0x20c4]
add edx, 0x58
cmp byte [edx], 2
sete al
mov byte [esi + ebx], al
movsx eax, al
add edi, eax
inc esi
add edx, 0x104
cmp esi, dword [ecx + 0xb8]
jl 0x542992
jmp 0x542a4f
cmp eax, esi
jle 0x542a4f
mov edx, dword [ecx + 0x20c4]
add edx, 0x58
cmp byte [edx], 2
sete al
mov byte [esi + ebx], al
movsx eax, al
add edi, eax
inc esi
add edx, 0x104
cmp esi, dword [ecx + 0xb8]
jl 0x5429c5
jmp 0x542a4f
mov ebx, dword [ecx + 0x1690]
xor edi, edi
cmp eax, esi
jle 0x542a4f
mov edx, dword [ecx + 0x20c4]
add edx, 0x58
cmp byte [edx], 1
sete al
mov byte [esi + ebx], al
movsx eax, al
add edi, eax
inc esi
add edx, 0x104
cmp esi, dword [ecx + 0xb8]
jl 0x5429f9
jmp 0x542a4f
mov ebx, dword [ecx + 0x1700]
xor edi, edi
xor edx, edx
test eax, eax
jle 0x542a4f
mov esi, dword [ecx + 0x20c4]
mov al, byte [esi]
and al, 1
mov byte [edx + ebx], al
movsx eax, al
add edi, eax
inc edx
add esi, 0x104
cmp edx, dword [ecx + 0xb8]
jl 0x542a2c
jmp 0x542a4f
mov ebx, dword [ebp - 0x34]
mov edi, dword [ebp + 8]
mov esi, dword [ecx + 0xb8]
xor eax, eax
add edi, edi
cmp edi, esi
setg al
and dword [ebp - 0x20], 0
cmp dword [ecx + 0xb4], 0
lea edx, [esi + ebx]
mov dword [ebp - 0x30], eax
jle 0x542ad8
xor esi, esi
cmp dword [ecx + 0xb0], esi
jle 0x542aca
mov eax, dword [ebp - 0x20]
lea edi, [esi + eax]
test edi, edi
je 0x542ab2
test eax, eax
jne 0x542a8f
movsx eax, byte [ebx - 1]
jmp 0x542ab5
test esi, esi
jne 0x542aa0
mov eax, ebx
sub eax, dword [ecx + 0xb0]
movsx eax, byte [eax]
jmp 0x542ab5
mov al, byte [ebx - 1]
mov edi, ebx
sub edi, dword [ecx + 0xb0]
cmp al, byte [edi]
movsx eax, al
je 0x542ab5
mov eax, dword [ebp - 0x30]
movsx edi, byte [ebx]
xor edi, eax
setne al
inc ebx
mov byte [edx], al
inc edx
inc esi
cmp esi, dword [ecx + 0xb0]
jl 0x542a7b
inc dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ecx + 0xb4]
jl 0x542a71
mov eax, dword [ecx + 0xb8]
mov dword [ebp - 0x10], ebx
sub ebx, eax
xor esi, esi
test eax, eax
mov dword [ebp - 0x34], ebx
jle 0x542afb
mov al, byte [ebp - 0x30]
xor byte [esi + ebx], al
inc esi
cmp esi, dword [ecx + 0xb8]
jl 0x542aec
mov eax, dword [ecx + 0xb8]
mov edx, eax
and edx, 1
je 0x542b11
push 2
pop esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x14], esi
cmp edx, eax
jge 0x542b5a
mov esi, dword [ebp - 0x10]
sub esi, ebx
lea eax, [edx + ebx]
mov dword [ebp - 0x1c], esi
movsx edi, byte [eax]
movsx esi, byte [eax + 1]
add esi, edi
mov esi, dword [esi*4 + str.NVH264.ax]
add dword [ebp - 0x14], esi
mov esi, dword [ebp - 0x10]
movsx esi, byte [esi + edx + 1]
mov edi, dword [ebp - 0x1c]
movsx edi, byte [edi + eax]
add esi, edi
mov esi, dword [esi*4 + str.NVH264.ax]
add dword [ebp - 0x2c], esi
inc edx
inc edx
inc eax
inc eax
cmp edx, dword [ecx + 0xb8]
jl 0x542b20
mov eax, dword [ebp - 0x14]
cmp eax, dword [ebp - 0xc]
jge 0x542b6c
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 1
mov eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0xc]
jge 0x542b7e
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 2
mov eax, dword [ecx + 0xb4]
push 3
xor edx, edx
pop esi
div esi
and dword [ebp - 0x20], 0
test edx, edx
jne 0x542ce1
mov esi, dword [ecx + 0xb0]
push 3
mov eax, esi
pop edi
div edi
test edx, edx
je 0x542ce1
mov eax, esi
and eax, 1
cmp dword [ecx + 0xb4], 0
mov dword [ebp - 0x14], eax
jle 0x542e40
mov edi, dword [ebp - 0x14]
mov eax, esi
imul eax, eax, 3
mov dword [ebp - 0x50], eax
lea eax, [edi + ebx]
mov dword [ebp - 0x3c], eax
mov eax, dword [ecx + 0xb4]
lea edi, [edi + esi*2]
add edi, ebx
push 3
dec eax
xor edx, edx
pop esi
div esi
mov dword [ebp - 0x48], edi
inc eax
mov dword [ebp - 0x4c], eax
mov edx, dword [ecx + 0xb0]
cmp dword [ebp - 0x14], edx
jge 0x542cc8
mov eax, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x10]
sub esi, ebx
add edx, eax
inc esi
mov dword [ebp - 0x34], esi
mov esi, dword [ebp - 0x10]
sub esi, ebx
mov dword [ebp - 0x1c], esi
mov esi, dword [ecx + 0xb0]
sub esi, dword [ebp - 0x14]
mov dword [ebp - 0x40], eax
dec esi
shr esi, 1
inc esi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x44], esi
movsx edi, byte [eax]
xor esi, esi
inc esi
movsx esi, byte [esi + eax]
add esi, edi
mov edi, dword [ebp - 0x1c]
movsx edi, byte [eax + edi]
mov dword [ebp - 0x54], edi
mov edi, dword [ebp - 0x34]
movsx eax, byte [edi + eax]
mov edi, dword [ebp - 0x54]
add edi, eax
xor eax, eax
inc eax
movsx eax, byte [eax + edx]
mov dword [ebp - 0x38], edi
movsx edi, byte [edx]
add edi, esi
mov esi, dword [ebp - 0x1c]
movsx esi, byte [edx + esi]
add esi, dword [ebp - 0x38]
add edi, eax
mov eax, dword [ebp - 0x34]
movsx eax, byte [eax + edx]
add esi, eax
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x38], esi
xor esi, esi
inc esi
movsx esi, byte [esi + eax]
movsx eax, byte [eax]
add esi, edi
add eax, esi
mov eax, dword [eax*4 + 0x4070d8]
add dword [ebp - 4], eax
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x34]
movsx esi, byte [esi + eax]
add esi, dword [ebp - 0x38]
add dword [ebp - 0x2c], 2
mov dword [ebp - 0x54], edi
mov edi, dword [ebp - 0x1c]
movsx eax, byte [eax + edi]
add eax, esi
mov eax, dword [eax*4 + 0x4070d8]
add dword [ebp - 8], eax
mov eax, dword [ebp - 0x40]
inc eax
inc eax
inc edx
inc edx
dec dword [ebp - 0x44]
mov dword [ebp - 0x40], eax
jne 0x542c27
mov edi, dword [ebp - 0x48]
mov eax, dword [ebp - 0x50]
add dword [ebp - 0x3c], eax
add edi, eax
dec dword [ebp - 0x4c]
mov dword [ebp - 0x48], edi
jne 0x542bec
jmp 0x542e40
mov eax, dword [ecx + 0xb4]
mov esi, dword [ecx + 0xb0]
and eax, 1
mov dword [ebp - 0x20], eax
push 3
xor edx, edx
mov eax, esi
pop edi
div edi
mov eax, dword [ecx + 0xb4]
cmp dword [ebp - 0x20], eax
mov dword [ebp - 0x14], edx
jge 0x542e40
mov edi, dword [ebp - 0x20]
mov edx, esi
imul edx, edi
lea eax, [esi + esi]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + 0xb4]
sub eax, dword [ebp - 0x20]
inc edi
imul edi, esi
dec eax
shr eax, 1
inc eax
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x54], eax
mov esi, dword [ebp - 0x14]
cmp esi, dword [ecx + 0xb0]
jge 0x542e2a
lea eax, [ebx + 1]
lea esi, [edx + eax]
mov edx, ebx
sub edx, eax
add esi, dword [ebp - 0x14]
add edx, 2
mov dword [ebp - 0x48], edx
mov edx, eax
neg edx
add ebx, edx
mov dword [ebp - 0x4c], ebx
mov ebx, dword [ebp - 0x10]
sub ebx, eax
add ebx, 2
add edi, eax
add edi, dword [ebp - 0x14]
mov dword [ebp - 0x3c], ebx
mov ebx, dword [ebp - 0x10]
sub ebx, eax
mov eax, dword [ebp - 0x10]
add edx, eax
mov eax, dword [ecx + 0xb0]
sub eax, dword [ebp - 0x14]
inc ebx
mov dword [ebp - 0x44], edx
push 3
mov dword [ebp - 0x40], ebx
dec eax
xor edx, edx
pop ebx
div ebx
inc eax
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x4c]
movsx eax, byte [esi + eax]
mov edx, dword [ebp - 0x48]
movsx edx, byte [esi + edx]
mov ebx, dword [ebp - 0x40]
movsx ebx, byte [esi + ebx]
add eax, edx
movsx edx, byte [esi]
add eax, edx
mov edx, dword [ebp - 0x44]
movsx edx, byte [esi + edx]
add edx, ebx
mov ebx, dword [ebp - 0x3c]
movsx ebx, byte [esi + ebx]
add edx, ebx
mov ebx, dword [ebp - 0x48]
movsx ebx, byte [ebx + edi]
add ebx, eax
movsx eax, byte [edi]
mov dword [ebp - 0x58], edx
mov edx, dword [ebp - 0x4c]
movsx edx, byte [edx + edi]
add ebx, edx
mov edx, dword [ebp - 0x40]
movsx edx, byte [edx + edi]
add edx, dword [ebp - 0x58]
add eax, ebx
mov eax, dword [eax*4 + 0x4070d8]
add dword [ebp - 4], eax
mov eax, dword [ebp - 0x44]
movsx eax, byte [eax + edi]
mov ebx, dword [ebp - 0x3c]
movsx ebx, byte [ebx + edi]
add edx, eax
add ebx, edx
mov eax, dword [ebx*4 + 0x4070d8]
add dword [ebp - 8], eax
add esi, 3
add edi, 3
dec dword [ebp - 0x38]
jne 0x542d97
mov ebx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
add edx, dword [ebp - 0x1c]
add edi, dword [ebp - 0x1c]
dec eax
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x54], eax
jne 0x542d36
mov edi, dword [ebp - 0x14]
test edi, edi
jle 0x542eb9
mov esi, dword [ebp - 0x10]
mov eax, ebx
sub eax, esi
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], edi
xor edx, edx
cmp dword [ecx + 0xb4], edx
jle 0x542e82
mov eax, dword [ebp - 0x58]
add eax, esi
cmp byte [eax], 0
jne 0x542e79
add eax, dword [ecx + 0xb0]
inc edx
cmp edx, dword [ecx + 0xb4]
jl 0x542e63
jmp 0x542e82
mov eax, dword [ecx + 0xb4]
add dword [ebp - 4], eax
xor eax, eax
cmp dword [ecx + 0xb4], eax
jle 0x542ead
mov edx, esi
cmp byte [edx], 0
jne 0x542ea4
add edx, dword [ecx + 0xb0]
inc eax
cmp eax, dword [ecx + 0xb4]
jl 0x542e8e
jmp 0x542ead
mov eax, dword [ecx + 0xb4]
add dword [ebp - 8], eax
inc dword [ebp - 4]
inc dword [ebp - 8]
inc esi
dec dword [ebp - 0x54]
jne 0x542e54
cmp dword [ebp - 0x20], 0
je 0x542f0e
cmp edi, dword [ecx + 0xb0]
mov eax, edi
jge 0x542ee5
cmp byte [eax + ebx], 0
jne 0x542eda
inc eax
cmp eax, dword [ecx + 0xb0]
jl 0x542ec9
jmp 0x542ee5
mov eax, dword [ecx + 0xb0]
sub eax, edi
add dword [ebp - 4], eax
cmp edi, dword [ecx + 0xb0]
mov eax, edi
jge 0x542f0e
mov edx, dword [ebp - 0x10]
cmp byte [edx + eax], 0
jne 0x542f03
inc eax
cmp eax, dword [ecx + 0xb0]
jl 0x542eef
jmp 0x542f0e
mov eax, dword [ecx + 0xb0]
sub eax, edi
add dword [ebp - 8], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jge 0x542f20
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 3
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 0xc]
jge 0x542f32
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 4
mov eax, dword [ecx + 0xb4]
add dword [ebp - 0x24], eax
test eax, eax
jle 0x542f72
mov edi, ebx
mov esi, eax
xor eax, eax
cmp dword [ecx + 0xb0], eax
jle 0x542f69
mov edx, edi
cmp byte [edx], 0
jne 0x542f60
inc eax
inc edx
cmp eax, dword [ecx + 0xb0]
jl 0x542f4f
jmp 0x542f69
mov eax, dword [ecx + 0xb0]
add dword [ebp - 0x24], eax
add edi, dword [ecx + 0xb0]
dec esi
jne 0x542f43
mov eax, dword [ebp - 0x24]
cmp eax, dword [ebp - 0xc]
jge 0x542f84
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 5
mov eax, dword [ecx + 0xb0]
add dword [ebp - 0x28], eax
xor esi, esi
test eax, eax
jle 0x542fc6
mov edi, eax
xor edx, edx
cmp dword [ecx + 0xb4], edx
jle 0x542fc1
lea eax, [esi + ebx]
cmp byte [eax], 0
jne 0x542fb8
add eax, dword [ecx + 0xb0]
inc edx
cmp edx, dword [ecx + 0xb4]
jl 0x542fa2
jmp 0x542fc1
mov eax, dword [ecx + 0xb4]
add dword [ebp - 0x28], eax
inc esi
cmp esi, edi
jl 0x542f95
mov eax, dword [ebp - 0xc]
cmp dword [ebp - 0x28], eax
pop edi
pop esi
pop ebx
jge 0x542fd6
push 6
pop edx
jmp 0x542fd9
mov edx, dword [ebp - 0x18]
cmp dword [ecx + 0x404], 0
je 0x542fe4
xor edx, edx
test edx, edx
je 0x542fed
add edx, edx
or edx, dword [ebp - 0x30]
mov eax, dword [ebp + 8]
sub eax, 0
je 0x543019
dec eax
je 0x543011
dec eax
je 0x543011
dec eax
je 0x543009
dec eax
jne 0x54301f
mov dword [ecx + 0x5fb8], edx
jmp 0x54301f
mov dword [ecx + 0x400], edx
jmp 0x54301f
mov dword [ecx + 0x3fc], edx
jmp 0x54301f
mov dword [ecx + 0x3f8], edx
leave
ret 4