Function at 0x476170
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x27c
mov eax, dword [0x4cd00c]
xor eax, esp
mov dword [esp + 0x278], eax
mov eax, dword [esp + 0x288]
mov edx, ecx
mov ecx, dword [esp + 0x284]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x28c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x290]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x298]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x294]
mov dword [esp + 8], edx
mov dword [esp], ecx
push ebp
mov ebp, dword [esp + 0x2a0]
cmp eax, 0x18
ja 0x476459
push ebx
push esi
push edi
xor edi, edi
lea ebx, [edx + 0x4b4]
jmp 0x4761f0
cmp dword [ebx + 0x134], eax
lea esi, [ebx + 0x102]
jne 0x47627a
push ecx
mov ecx, ebx
call fcn.00469ab0
test al, al
je 0x47626f
mov ecx, dword [esp + 0x14]
mov edx, 0xc
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x47626f
add esi, 4
add ecx, 4
sub edx, 4
jae 0x476213
push 0
push 0
lea eax, [esp + 0x50]
mov ecx, 8
lea esi, [ebx + 0x112]
lea edi, [esp + 0x50]
push 0x20
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.00469d50
lea esi, [ebx + 0x138]
mov ecx, 8
lea edi, [esp + 0x38]
add esp, 0x10
rep movsd dword es:[edi], dword [esi]
lea esi, [ebx + 0x158]
mov ecx, 8
lea edi, [esp + 0x68]
rep movsd dword es:[edi], dword [esi]
jmp 0x4763a5
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x2a4]
inc edi
add ebx, 0x178
cmp edi, 4
jb 0x4761f0
push 0x200
lea eax, [esp + 0x8c]
push eax
push dword [esp + 0x24]
call fcn.00468ea0
lea edx, [esp + 0x94]
add esp, 0xc
lea ecx, [edx + 1]
lea ecx, [ecx]
mov al, byte [edx]
inc edx
test al, al
jne 0x4762b0
mov edi, dword [esp + 0x2a4]
sub edx, ecx
mov ebx, dword [esp + 0x14]
mov ecx, edi
mov eax, 1
shl eax, cl
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x70]
push eax
lea eax, [esp + 0x54]
push eax
push 0x10
push ebx
push edx
lea eax, [esp + 0xa4]
push eax
call fcn.00476790
lea eax, [esp + 0xa8]
push 0x200
push eax
call fcn.00469ec0
mov esi, dword [esp + 0x40]
push 0
push 1
push 0x20
mov ecx, dword [esi + 0xa94]
lea edx, [esi + 0x4b4]
mov eax, ecx
and eax, 3
imul eax, eax, 0x178
add edx, eax
lea eax, [ecx + 1]
mov dword [esi + 0xa94], eax
mov ecx, 0x40
mov esi, dword [esp + 0x44]
mov dword [edx + 0x134], edi
mov edi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, 8
movsw word es:[edi], word [esi]
mov eax, dword [ebx]
lea esi, [esp + 0x7c]
mov dword [edx + 0x102], eax
mov eax, dword [ebx + 4]
mov dword [edx + 0x106], eax
mov eax, dword [ebx + 8]
mov dword [edx + 0x10a], eax
mov eax, dword [ebx + 0xc]
mov dword [edx + 0x10e], eax
lea eax, [edx + 0x112]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
lea edi, [edx + 0x138]
mov ecx, 8
lea esi, [esp + 0x5c]
rep movsd dword es:[edi], dword [esi]
lea edi, [edx + 0x158]
mov ecx, 8
lea esi, [esp + 0x9c]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.00469d50
add esp, 0x38
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4763ba
mov ecx, 8
lea esi, [esp + 0x68]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
test ebp, ebp
je 0x47641e
xor eax, eax
mov esi, 1
mov dword [ebp], eax
xor edi, edi
mov dword [ebp + 4], eax
lea edx, [eax + 3]
mov al, byte [esp + esi + 0x27]
mov ecx, edi
and ecx, 7
add edi, 4
xor byte [ecx + ebp], al
mov ecx, esi
mov al, byte [esp + esi + 0x28]
and ecx, 7
add esi, 4
xor byte [ecx + ebp], al
lea ecx, [edx - 1]
mov al, byte [esp + edx + 0x27]
and ecx, 7
xor byte [ecx + ebp], al
mov ecx, edx
mov al, byte [esp + edx + 0x28]
and ecx, 7
add edx, 4
xor byte [ecx + ebp], al
cmp esi, 0x21
jb 0x4763d0
lea eax, [esp + 0x28]
push 0x20
push eax
call fcn.00469ec0
add esp, 8
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebx
test eax, eax
je 0x47644a
mov ecx, dword [esp + 0xc]
push eax
push 0x100
lea eax, [esp + 0x44]
add ecx, 0xa9c
push eax
push dword [esp + 0x290]
call fcn.00489830
lea eax, [esp + 0x3c]
push 0x20
push eax
call fcn.00469ec0
add esp, 8
mov ecx, dword [esp + 0x27c]
pop ebp
xor ecx, esp
call fcn.00443db6
add esp, 0x27c
ret 0x20