Function at 0x408960
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x5b39c0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x1c], eax
test esi, esi
jne 0x40899d
pop esi
mov eax, 0xffffff9a
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052db16
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x38], 0
je 0x408988
cmp dword [esi + 0x9c], 0
je 0x4089b5
push esi
call fcn.00408530
add esp, 4
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
push esi
call fcn.00408e80
add esp, 0x10
test eax, eax
je 0x4089e3
pop esi
mov eax, 0xffffff99
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052db16
mov esp, ebp
pop ebp
ret
push edi
push 0x90
call fcn.00530abe
mov edi, eax
add esp, 4
test edi, edi
je 0x408a2f
push 0x4000
call fcn.00530abe
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp + 0x14]
mov dword [edi + 0x44], ecx
mov ecx, dword [ebp - 0x24]
add esp, 4
mov dword [edi], eax
mov dword [edi + 0x48], ecx
mov dword [edi + 0x4c], 0
mov dword [edi + 0x8c], edx
test eax, eax
jne 0x408a45
push edi
call fcn.00530a86
add esp, 4
pop edi
pop esi
mov eax, 0xffffff98
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052db16
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x14]
mov dword [edi + 0x40], 0
test ecx, ecx
je 0x408a58
mov eax, dword [esi + 0x54]
mov dword [ecx], eax
test ebx, ebx
je 0x408a8d
mov dword [ebx], 6
mov eax, dword [esi + 0x50]
and eax, 6
sub eax, 2
je 0x408a87
sub eax, 2
je 0x408a7f
sub eax, 2
jne 0x408a8d
mov dword [ebx], 1
jmp 0x408a8d
mov dword [ebx], 2
jmp 0x408a8d
mov dword [ebx], 9
mov eax, dword [esi + 0x5c]
mov dword [edi + 0x54], eax
mov dword [edi + 0x50], 0
mov eax, dword [esi + 0x54]
mov dword [edi + 0x84], eax
mov eax, dword [esi + 0x20]
mov dword [edi + 0x80], eax
movq xmm0, qword [esi]
movq qword [edi + 0x60], xmm0
movq xmm0, qword [esi + 8]
movq qword [edi + 0x68], xmm0
movq xmm0, qword [esi + 0x10]
movq qword [edi + 0x70], xmm0
movq xmm0, qword [esi + 0x18]
movq qword [edi + 0x78], xmm0
mov eax, dword [esi + 0x2c]
mov dword [edi + 0x88], eax
mov dword [edi + 0x18], 0
cmp dword [esi + 0x54], 8
jne 0x408b21
test edx, edx
jne 0x408b21
push 0x38
push 0x55b294
lea eax, [edi + 4]
push 0xfffffffffffffff1
push eax
mov dword [edi + 0x24], edx
mov dword [edi + 0x28], edx
mov dword [edi + 0x2c], edx
mov dword [eax], edx
mov dword [edi + 8], edx
call fcn.0040a6d0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x408c07
mov dword [edi + 0x40], 1
mov eax, dword [esi + 0x60]
mov dword [edi + 0x58], eax
mov eax, dword [esi + 0x64]
mov dword [edi + 0x5c], eax
mov eax, dword [ebp - 0x18]
add eax, 0x1e
add eax, dword [esi + 0x98]
mov dword [edi + 8], 0
mov dword [edi + 0x3c], eax
mov dword [esi + 0x9c], edi
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x408bf4
call fcn.0040c050
push eax
lea ebx, [esi + 0xa4]
push ebx
push edi
mov dword [esi + 0xb0], eax
call fcn.004084a0
mov ecx, dword [esi + 0x9c]
push 0
mov eax, dword [ecx + 0x88]
add eax, dword [ecx + 0x3c]
push eax
push dword [esi + 0x20]
mov eax, dword [esi + 0x10]
push dword [esi + 0x1c]
call eax
add esp, 0x1c
test eax, eax
jne 0x408a2f
push 0xc
lea eax, [ebp - 0x10]
push eax
push dword [esi + 0x20]
mov eax, dword [esi + 4]
push dword [esi + 0x1c]
call eax
add esp, 0x10
cmp eax, 0xc
jb 0x408a2f
xor edi, edi
mov edx, dword [esi + 0xb0]
push edx
push ebx
call fcn.00408470
movsx ecx, byte [ebp + edi - 0x10]
xor eax, ecx
mov byte [ebp + edi - 0x10], al
movsx eax, al
push eax
push edx
push ebx
call fcn.00409630
inc edi
add esp, 0x14
cmp edi, 0xc
jl 0x408bb4
mov eax, dword [esi + 0x9c]
add dword [eax + 0x3c], 0xc
mov dword [esi + 0xa0], 1
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0052db16
mov esp, ebp
pop ebp
ret
push edi
call fcn.00530a86
mov ecx, dword [ebp - 4]
add esp, 4
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0052db16
mov esp, ebp
pop ebp
ret