Function at 0x493550
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 4], ebx
push esi
test eax, eax
je 0x49379e
mov esi, dword [eax + 0x9c]
test esi, esi
je 0x49379e
cmp dword [esi], ebx
jne 0x493583
pop esi
lea eax, [ebx - 0x64]
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp + 0x10]
test edx, edx
jne 0x493592
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [esi + 0x10], eax
mov eax, dword [esi + 0x5c]
mov dword [esi + 0x14], edx
push edi
mov edi, edx
cmp edx, eax
jbe 0x4935b2
cmp dword [esi + 0x8c], ebx
jne 0x4935b2
mov dword [esi + 0x14], eax
mov edi, eax
mov eax, dword [esi + 8]
add eax, dword [esi + 0x58]
cmp edx, eax
jbe 0x4935c9
cmp dword [esi + 0x8c], ebx
je 0x4935c9
mov dword [esi + 0x14], eax
mov edi, eax
test edi, edi
je 0x493778
mov edi, dword [esi + 8]
test edi, edi
jne 0x4936a3
mov eax, dword [esi + 0x58]
test eax, eax
je 0x4936a3
mov edi, 0x4000
cmp eax, edi
push 0
cmovb edi, eax
mov eax, dword [esi + 0x88]
add eax, dword [esi + 0x3c]
push eax
push dword [esi + 0x80]
mov eax, dword [esi + 0x70]
push dword [esi + 0x7c]
call eax
add esp, 0x10
test eax, eax
jne 0x493781
mov eax, dword [esi + 0x64]
push edi
push dword [esi]
push dword [esi + 0x80]
push dword [esi + 0x7c]
call eax
add esp, 0x10
cmp eax, edi
jne 0x493781
mov eax, dword [ebp + 8]
cmp dword [eax + 0xa0], 0
je 0x493695
xor ebx, ebx
test edi, edi
je 0x493695
lea ecx, [eax + 0xa4]
mov dword [ebp - 8], ecx
nop dword [eax]
mov edx, dword [eax + 0xac]
mov ecx, dword [esi]
and edx, 0xfffd
or edx, 2
mov eax, edx
xor eax, 1
imul eax, edx
shr eax, 8
xor byte [ecx + ebx], al
movsx eax, byte [ecx + ebx]
push eax
mov eax, dword [ebp + 8]
push dword [eax + 0xb0]
push dword [ebp - 8]
call fcn.00494030
mov ecx, dword [esi]
add esp, 0xc
mov byte [ebx + ecx], al
inc ebx
mov eax, dword [ebp + 8]
cmp ebx, edi
jb 0x493650
add dword [esi + 0x3c], edi
mov eax, dword [esi]
sub dword [esi + 0x58], edi
mov dword [esi + 4], eax
mov dword [esi + 8], edi
cmp dword [esi + 0x84], 0
je 0x493716
cmp dword [esi + 0x8c], 0
jne 0x493716
mov eax, dword [esi + 0x18]
mov dword [ebp - 8], eax
mov eax, dword [esi + 0x10]
mov dword [ebp - 0xc], eax
lea eax, [esi + 4]
push 2
push eax
call fcn.0048f4e0
mov ebx, eax
add esp, 8
test ebx, ebx
js 0x4936e1
cmp dword [esi + 0x1c], 0
mov eax, 0xfffffffd
cmovne ebx, eax
mov edi, dword [esi + 0x18]
sub edi, dword [ebp - 8]
push edi
push dword [ebp - 0xc]
push dword [esi + 0x50]
call fcn.004943b0
mov ecx, dword [ebp - 4]
add esp, 0xc
sub dword [esi + 0x5c], edi
add ecx, edi
mov dword [esi + 0x50], eax
mov dword [ebp - 4], ecx
cmp ebx, 1
je 0x49378b
test ebx, ebx
jne 0x493778
mov eax, dword [esi + 0x14]
jmp 0x49376d
test edi, edi
jne 0x49371f
cmp dword [esi + 0x58], edi
je 0x493794
mov ebx, dword [esi + 0x14]
cmp ebx, edi
cmovae ebx, edi
xor edx, edx
test ebx, ebx
je 0x493741
nop dword [eax]
mov eax, dword [esi + 4]
mov ecx, dword [esi + 0x10]
mov al, byte [edx + eax]
mov byte [edx + ecx], al
inc edx
cmp edx, ebx
jb 0x493730
push ebx
push dword [esi + 0x10]
push dword [esi + 0x50]
call fcn.004943b0
sub dword [esi + 0x5c], ebx
add esp, 0xc
sub dword [esi + 8], ebx
add dword [esi + 0x10], ebx
add dword [esi + 4], ebx
add dword [esi + 0x18], ebx
mov dword [esi + 0x50], eax
mov eax, dword [esi + 0x14]
sub eax, ebx
add dword [ebp - 4], ebx
mov dword [esi + 0x14], eax
test eax, eax
jne 0x4935d1
mov ebx, dword [ebp - 4]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
mov eax, 0xffffff9a
pop ebx
mov esp, ebp
pop ebp
ret