Function at 0x49e7f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x20
call fcn.00596bf0
mov edx, dword [esi + 0x164]
mov eax, dword [esi + 0x170]
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, ecx
mov ecx, dword [esi + 0x174]
mov dword [ebp - 0xc], edx
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], eax
xor eax, eax
mov ecx, edx
add ecx, dword [esi + 0x38]
adc eax, dword [esi + 0x3c]
cmp eax, 0xf
ja 0x49eabb
jb 0x49e840
cmp ecx, 0xffffffe0
ja 0x49eabb
mov dword [esi + 0x38], ecx
mov dword [esi + 0x3c], eax
mov eax, dword [esi + 0x168]
xor ecx, ecx
mov dword [ebp - 4], eax
cmp dword [esi + 0x16c], ecx
je 0x49e8c2
cmp edx, ecx
jne 0x49e882
mov edx, dword [esi + 0x160]
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call edx
add esp, 8
mov dword [esi + 0x16c], 0
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0x40]
mov edx, dword [esi + 0x44]
mov dword [esi + 0x178], eax
mov eax, dword [esi + 0x48]
mov dword [esi + 0x17c], edx
mov edx, dword [esi + 0x4c]
mov dword [esi + 0x180], eax
mov dword [ebp - 4], 0x10
mov eax, dword [ebp - 4]
mov dword [esi + 0x184], edx
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], ecx
mov dword [esi + 0x48], ecx
mov dword [esi + 0x4c], ecx
mov dword [esi + 0x16c], ecx
mov ecx, dword [esi + 0xc]
mov edx, eax
bswap ecx
and edx, 0xf
mov dword [ebp - 8], ecx
mov dword [ebp - 0x10], edx
je 0x49e92c
jmp 0x49e8d9
mov edx, dword [ebp - 0x10]
cmp dword [ebp + 0xc], 0
je 0x49e904
mov cl, byte [edi]
dec dword [ebp + 0xc]
mov byte [eax + esi + 0x178], cl
mov dl, byte [edx + esi + 0x10]
xor dl, cl
mov ecx, dword [ebp - 0x10]
mov byte [ebx], dl
inc ecx
inc ebx
inc eax
inc edi
and ecx, 0xf
mov dword [ebp - 0x10], ecx
jne 0x49e8d6
jmp 0x49e90c
test edx, edx
jne 0x49eaad
push eax
lea edx, [esi + 0x178]
push edx
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call dword [ebp - 0xc]
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
add esp, 0x10
cmp dword [ebp + 0xc], 0x10
jb 0x49e956
test eax, eax
je 0x49e956
push eax
lea edx, [esi + 0x178]
push edx
lea eax, [esi + 0x60]
push eax
lea ecx, [esi + 0x40]
push ecx
call dword [ebp - 0xc]
mov dword [ebp - 4], 0
mov eax, dword [ebp - 4]
add esp, 0x10
mov ecx, dword [ebp + 0xc]
cmp ecx, 0xc00
jb 0x49e9e7
mov eax, 0xaaaaaaab
mul ecx
shr edx, 0xb
mov dword [ebp - 0x20], edx
push 0xc00
push edi
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x40]
push eax
call dword [ebp - 0xc]
add esp, 0x10
mov dword [ebp - 0x1c], 0xc0
lea ecx, [ecx]
mov edx, dword [ebp - 0x14]
push edx
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0x18]
mov eax, dword [ebp - 8]
inc eax
mov dword [ebp - 8], eax
bswap eax
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0x10]
xor eax, dword [edi]
add esp, 0xc
mov dword [ebx], eax
mov ecx, dword [edi + 4]
xor ecx, dword [esi + 0x14]
add ebx, 0x10
mov dword [ebx - 0xc], ecx
mov edx, dword [edi + 8]
xor edx, dword [esi + 0x18]
add edi, 0x10
mov dword [ebx - 8], edx
mov eax, dword [edi - 4]
xor eax, dword [esi + 0x1c]
dec dword [ebp - 0x1c]
mov dword [ebx - 4], eax
jne 0x49e990
sub dword [ebp + 0xc], 0xc00
dec dword [ebp - 0x20]
jne 0x49e972
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 0xc]
and ecx, 0xfffffff0
je 0x49ea5f
push ecx
push edi
lea ecx, [esi + 0x60]
push ecx
lea edx, [esi + 0x40]
push edx
call dword [ebp - 0xc]
add esp, 0x10
cmp dword [ebp + 0xc], 0x10
jb 0x49ea5c
mov eax, dword [ebp + 0xc]
shr eax, 4
mov dword [ebp - 0x20], eax
mov edi, edi
mov eax, dword [ebp - 0x14]
push eax
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0x18]
mov eax, dword [ebp - 8]
inc eax
sub dword [ebp + 0xc], 0x10
mov dword [ebp - 8], eax
bswap eax
mov dword [esi + 0xc], eax
mov ecx, dword [esi + 0x10]
xor ecx, dword [edi]
add esp, 0xc
mov dword [ebx], ecx
mov edx, dword [edi + 4]
xor edx, dword [esi + 0x14]
add ebx, 0x10
mov dword [ebx - 0xc], edx
mov eax, dword [edi + 8]
xor eax, dword [esi + 0x18]
add edi, 0x10
mov dword [ebx - 8], eax
mov ecx, dword [edi - 4]
xor ecx, dword [esi + 0x1c]
dec dword [ebp - 0x20]
mov dword [ebx - 4], ecx
jne 0x49ea10
mov eax, dword [ebp - 4]
cmp dword [ebp + 0xc], 0
je 0x49eaad
mov edx, dword [ebp - 0x14]
push edx
lea eax, [esi + 0x10]
push eax
push esi
call dword [ebp - 0x18]
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
inc eax
bswap eax
mov dword [esi + 0xc], eax
add esp, 0xc
lea eax, [edx + ebx]
lea edx, [edx + esi + 0x10]
sub edi, ebx
mov cl, byte [edi + eax]
mov ebx, dword [ebp - 4]
dec dword [ebp + 0xc]
inc dword [ebp - 4]
mov byte [esi + ebx + 0x178], cl
mov bl, byte [edx]
xor bl, cl
mov byte [eax], bl
inc edx
inc eax
cmp dword [ebp + 0xc], 0
jne 0x49ea89
mov eax, dword [ebp - 4]
mov dword [esi + 0x168], eax
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret