Function at 0x493970
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
mov eax, dword [0x5c4954]
xor eax, esp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x34]
push ebx
mov ebx, dword [esp + 0x28]
push esi
mov esi, dword [esp + 0x34]
push edi
mov edi, dword [esp + 0x34]
mov dword [esp + 0x14], eax
test ebx, ebx
jne 0x4939b2
pop edi
pop esi
mov eax, 0xffffff9a
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0052b318
add esp, 0x20
ret 0x14
cmp dword [ebx + 0x38], 0
je 0x493999
cmp dword [ebx + 0x9c], 0
je 0x4939c7
push ebx
call fcn.00493680
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
push eax
mov eax, ebx
call fcn.00493230
add esp, 0xc
test eax, eax
je 0x4939fd
pop edi
pop esi
mov eax, 0xffffff99
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0052b318
add esp, 0x20
ret 0x14
push ebp
push 0x90
call fcn.0052b6e7
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x493a4b
push 0x4000
call fcn.0052b6e7
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov dword [ebp + 0x44], ecx
xor ecx, ecx
mov dword [ebp + 0x48], edx
mov edx, dword [esp + 0x44]
add esp, 4
mov dword [ebp], eax
mov dword [ebp + 0x4c], ecx
mov dword [ebp + 0x8c], edx
cmp eax, ecx
jne 0x493a65
push ebp
call fcn.0052b60a
add esp, 4
pop ebp
pop edi
pop esi
mov eax, 0xffffff98
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0052b318
add esp, 0x20
ret 0x14
mov dword [ebp + 0x40], ecx
cmp edi, ecx
je 0x493a71
mov eax, dword [ebx + 0x54]
mov dword [edi], eax
cmp esi, ecx
je 0x493aa6
mov dword [esi], 6
mov eax, dword [ebx + 0x50]
and eax, 6
sub eax, 2
je 0x493aa0
sub eax, 2
je 0x493a98
sub eax, 2
jne 0x493aa6
mov dword [esi], 1
jmp 0x493aa6
mov dword [esi], 2
jmp 0x493aa6
mov dword [esi], 9
mov eax, dword [ebx + 0x5c]
mov dword [ebp + 0x50], ecx
mov dword [ebp + 0x54], eax
mov ecx, dword [ebx + 0x54]
mov dword [ebp + 0x84], ecx
mov eax, dword [ebx + 0x20]
mov dword [ebp + 0x80], eax
lea edi, [ebp + 0x60]
mov ecx, 8
mov esi, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [ebx + 0x2c]
xor esi, esi
mov dword [ebp + 0x88], ecx
mov dword [ebp + 0x18], esi
cmp dword [ebx + 0x54], 8
jne 0x493b16
cmp edx, esi
jne 0x493b16
push 0x38
push 0x57a67c
lea eax, [ebp + 4]
push 0xfffffffffffffff1
push eax
mov dword [ebp + 0x24], esi
mov dword [ebp + 0x28], esi
mov dword [ebp + 0x2c], esi
mov dword [eax], esi
mov dword [ebp + 8], esi
call fcn.00494c90
mov edi, eax
cmp edi, esi
jne 0x493c0e
mov dword [ebp + 0x40], 1
mov edx, dword [ebx + 0x60]
mov dword [ebp + 0x58], edx
mov eax, dword [ebx + 0x64]
mov edx, dword [esp + 0x10]
mov dword [ebp + 0x5c], eax
mov ecx, dword [ebx + 0x98]
lea eax, [ecx + edx + 0x1e]
mov dword [ebp + 0x3c], eax
mov dword [ebp + 8], esi
mov dword [ebx + 0x9c], ebp
mov ebp, dword [esp + 0x18]
cmp ebp, esi
je 0x493bf7
call fcn.00494870
mov dword [ebx + 0xb0], eax
lea esi, [ebx + 0xa4]
mov edi, eax
mov edx, esi
mov eax, ebp
call fcn.004929f0
mov eax, dword [ebx + 0x9c]
mov ecx, dword [eax + 0x88]
add ecx, dword [eax + 0x3c]
mov edx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x1c]
push 0
push ecx
mov ecx, dword [ebx + 0x10]
push edx
push eax
call ecx
add esp, 0x10
test eax, eax
jne 0x493a4b
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x1c]
push 0xc
lea edx, [esp + 0x24]
push edx
mov edx, dword [ebx + 4]
push eax
push ecx
call edx
add esp, 0x10
cmp eax, 0xc
jb 0x493a4b
xor ebp, ebp
mov eax, dword [ebx + 0xac]
mov edi, dword [ebx + 0xb0]
and eax, 0xfffd
or eax, 2
mov ecx, eax
xor ecx, 1
imul ecx, eax
shr ecx, 8
xor byte [esp + ebp + 0x20], cl
movsx eax, byte [esp + ebp + 0x20]
call fcn.004929b0
inc ebp
cmp ebp, 0xc
jl 0x493bb0
mov eax, dword [ebx + 0x9c]
add dword [eax + 0x3c], 0xc
mov dword [ebx + 0xa0], 1
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x1c]
xor ecx, esp
call fcn.0052b318
add esp, 0x20
ret 0x14
push ebp
call fcn.0052b60a
mov ecx, dword [esp + 0x30]
add esp, 4
pop ebp
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0052b318
add esp, 0x20
ret 0x14