Function at 0x408202
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x158
mov eax, dword [0x4c3014]
xor eax, esp
mov dword [esp + 0x154], eax
mov eax, dword [ecx + 0x10]
push ebx
push ebp
mov ebp, dword [esp + 0x164]
xor ebx, ebx
push esi
push edi
mov edi, dword [eax + 0x10]
push 9
mov dword [esp + 0x1c], eax
pop eax
mov esi, dword [edi + 4]
cmp esi, eax
mov dword [esp + 0x20], edx
cmovb eax, esi
mov dword [esp + 0x24], ebp
push eax
lea eax, [esp + 0x12c]
mov dword [esp + 0x12c], 0x8648862a
push eax
push dword [edi + 8]
mov dword [esp + 0x138], 0x5010df7
mov byte [esp + 0x13c], 0xd
mov dword [esp + 0x140], 0x8648862a
mov dword [esp + 0x144], 0xc010df7
mov word [esp + 0x148], 0x105
mov byte [esp + 0x14a], 3
call fcn.0047ef51
add esp, 0xc
test eax, eax
jne 0x408495
mov eax, dword [edi + 0x14]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 0x14]
push dword [edx + 4]
push 0x4b5b48
mov eax, dword [eax + 0x10]
push dword [edx + 8]
mov dword [esp + 0x20], eax
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 0x14]
mov eax, dword [eax + 0x14]
mov esi, dword [eax + 0x10]
mov eax, dword [ecx + 0x14]
mov ebp, dword [eax + 0x10]
call fcn.0047ef51
add esp, 0xc
mov edi, eax
push dword [esi + 4]
push 0x4b5b54
push dword [esi + 8]
call fcn.0047ef51
add esp, 0xc
mov esi, eax
push dword [ebp + 4]
push 0x4b5b60
push dword [ebp + 8]
call fcn.0047ef51
add esp, 0xc
test edi, edi
jne 0x408491
test esi, esi
jne 0x408491
test eax, eax
jne 0x408491
mov esi, dword [ebp + 0x14]
cmp dword [esi + 4], 0xe
jne 0x408491
mov eax, dword [esp + 0x14]
cmp dword [eax + 4], 0x20
jne 0x408491
mov eax, dword [esp + 0x18]
lea edi, [esp + 0x136]
mov esi, dword [esi + 8]
mov ecx, dword [esp + 0x20]
mov ebp, dword [eax + 0x14]
mov eax, 0xe04
mov word [esp + 0x134], ax
lea eax, [esp + 0x144]
movsd dword es:[edi], dword [esi]
push eax
push 0x14
pop edx
movsd dword es:[edi], dword [esi]
mov dword [esp + 0x20], ebp
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
call fcn.00407e60
mov eax, dword [esp + 0x18]
lea edx, [esp + 0x148]
lea ecx, [esp + 0x2c]
mov esi, dword [eax + 4]
mov edi, dword [eax + 8]
call fcn.00407c38
pop ecx
push esi
mov edx, edi
mov dword [esp + 0x18], 0x1000000
lea ecx, [esp + 0xac]
call fcn.00407bb2
pop ecx
push 4
lea edx, [esp + 0x18]
lea ecx, [esp + 0xac]
call fcn.00407bb2
pop ecx
lea edx, [esp + 0x28]
mov ecx, edx
call fcn.00407ce2
push 8
pop ecx
push dword [ebp + 4]
lea esi, [esp + 0x2c]
lea edi, [esp + 0x148]
rep movsd dword es:[edi], dword [esi]
call fcn.00484ab0
mov ebx, eax
mov dword [esp + 0x1c], ebx
pop ecx
test ebx, ebx
je 0x4084de
mov eax, dword [esp + 0x1c]
mov ebp, dword [ebp + 4]
push ebp
push dword [eax + 8]
push ebx
call fcn.0047e230
add esp, 0xc
lea edx, [esp + 0x144]
lea ecx, [esp + 0x28]
call fcn.00406cd5
lea esi, [esp + 0x134]
lea edi, [esp + 0x118]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
test ebp, ebp
je 0x408485
lea eax, [esp + 0x118]
sub eax, ebx
dec ebp
shr ebp, 4
mov dword [esp + 0x14], eax
inc ebp
mov esi, ebx
lea edi, [esp + 0x134]
lea edx, [esp + 0x28]
mov ecx, ebx
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00406fe5
mov ecx, dword [esp + 0x14]
push 0x10
pop edx
mov al, byte [ecx + ebx]
xor byte [ebx], al
inc ebx
sub edx, 1
jne 0x408455
lea esi, [esp + 0x134]
sub ecx, 0x10
mov dword [esp + 0x14], ecx
lea edi, [esp + 0x118]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
sub ebp, 1
jne 0x408436
mov eax, dword [esp + 0x1c]
mov ebp, dword [eax + 4]
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x18]
mov dword [eax], ebp
jmp 0x4084de
xor eax, eax
jmp 0x4084e0
push 0xb
pop eax
cmp esi, eax
cmovb eax, esi
push eax
lea eax, [esp + 0x138]
push eax
push dword [edi + 8]
call fcn.0047ef51
add esp, 0xc
test eax, eax
jne 0x4084de
mov eax, dword [edi + 0x14]
mov ecx, dword [esp + 0x20]
mov edx, dword [eax + 0x10]
mov eax, dword [esp + 0x18]
mov edx, dword [edx + 8]
mov esi, dword [eax + 0x14]
push dword [esi + 4]
push dword [esi + 8]
call fcn.004080aa
pop ecx
mov ebx, eax
mov eax, dword [esi + 4]
pop ecx
mov dword [ebp], eax
mov eax, ebx
mov ecx, dword [esp + 0x164]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0047c71d
add esp, 0x158
ret