Function at 0x4da378
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, edx
mov ebx, eax
cmp dword [ebx + 4], 0
jl 0x4da5a2
cmp dword [ebx + 0x28], 0
jle 0x4da5a2
mov edx, esi
mov eax, ebx
call fcn.004da8a8
mov edi, eax
mov dword [ebx + 0xc], edi
test edi, edi
jge 0x4da3cf
mov edx, dword [ebx + 0x18]
mov eax, ebx
call fcn.004da8a8
mov esi, eax
mov dword [ebx + 0xc], esi
test esi, esi
jge 0x4da3cc
xor eax, eax
mov dword [ebx + 0xc], eax
lea eax, [eax + eax*4]
mov edx, dword [ebx + 0x1a8]
mov esi, dword [edx + eax*8 + 0xc]
jmp 0x4da3cf
mov esi, dword [ebx + 0x18]
cmp dword [ebx + 0x1c], 0
je 0x4da3dd
mov eax, dword [ebx + 0x14]
mov dword [ebx + 0x10], eax
jmp 0x4da3e0
mov dword [ebx + 0x10], esi
mov eax, dword [ebx + 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebx + 0x1a8]
mov eax, dword [edx + eax*8 + 8]
push eax
lea eax, [ebx + 0x1ac]
mov ecx, 1
mov edx, dword [0x4da090]
call fcn.00406030
add esp, 4
mov eax, dword [ebx + 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebx + 0x1a8]
mov edx, dword [edx + eax*8 + 4]
xor ecx, ecx
mov eax, dword [ebx + 4]
call fcn.00409578
mov eax, dword [ebx + 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebx + 0x1a8]
mov ecx, dword [edx + eax*8 + 8]
shl ecx, 2
mov edx, dword [ebx + 0x1ac]
mov eax, dword [ebx + 4]
call fcn.00409520
mov eax, dword [ebx + 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebx + 0x1a8]
mov eax, dword [edx + eax*8 + 8]
push eax
lea eax, [ebx + 0x1b0]
mov ecx, 1
mov edx, dword [0x4da0bc]
call fcn.00406030
add esp, 4
mov eax, dword [ebx + 0x1b0]
xor edx, edx
mov dword [eax], edx
mov eax, dword [ebx + 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebx + 0x1a8]
mov edx, dword [edx + eax*8 + 8]
dec edx
test edx, edx
jle 0x4da4b4
mov eax, 1
mov ecx, dword [ebx + 0x1b0]
mov ecx, dword [ecx + eax*4 - 4]
mov esi, dword [ebx + 0x1ac]
add ecx, dword [esi + eax*4 - 4]
mov esi, dword [ebx + 0x1b0]
mov dword [esi + eax*4], ecx
inc eax
dec edx
jne 0x4da493
mov eax, dword [ebx + 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebx + 0x1a8]
mov eax, dword [edx + eax*8]
push eax
lea eax, [ebx + 0x1b4]
mov ecx, 1
mov edx, dword [0x4da0e8]
call fcn.00406030
add esp, 4
mov eax, dword [ebx + 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebx + 0x1a8]
mov ecx, dword [edx + eax*8]
mov edx, dword [ebx + 0x1b4]
mov eax, dword [ebx + 4]
call fcn.00409520
mov eax, dword [ebx + 0xc]
lea eax, [eax + eax*4]
mov edx, dword [ebx + 0x1a8]
mov edx, dword [edx + eax*8]
dec edx
test edx, edx
jl 0x4da51f
inc edx
xor eax, eax
mov ecx, dword [ebx + 0x1b4]
xor byte [ecx + eax], 0xa0
inc eax
dec edx
jne 0x4da511
xor ecx, ecx
xor edx, edx
mov eax, dword [ebx + 4]
call fcn.00409578
lea edx, [ebx + 0x28]
mov ecx, 0x180
mov eax, dword [ebx + 4]
call fcn.0040954c
mov eax, dword [ebx + 4]
call fcn.004095bc
mov edx, 0x42
mov eax, dword [ebx + 0x20]
call fcn.00409498
mov esi, eax
mov dword [ebx + 4], esi
test esi, esi
jle 0x4da576
mov ecx, 2
xor edx, edx
mov eax, esi
call fcn.00409578
mov dword [ebx + 8], eax
xor ecx, ecx
xor edx, edx
mov eax, dword [ebx + 4]
call fcn.00409578
mov eax, dword [ebx + 0x24]
call fcn.00409874
mov eax, dword [ebx + 0x24]
call fcn.004094f4
mov esi, eax
test esi, esi
jle 0x4da5a2
lea edx, [ebx + 0x10]
mov ecx, 4
mov eax, esi
call fcn.0040954c
mov eax, esi
call fcn.004095bc
pop edi
pop esi
pop ebx
ret