Function at 0x40c160
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x27c
mov eax, dword [0x451a14]
xor eax, esp
mov dword [esp + 0x278], eax
mov eax, dword [esp + 0x288]
mov edx, ecx
mov ecx, dword [esp + 0x284]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x28c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x290]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x298]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x294]
mov dword [esp + 0xc], edx
mov dword [esp], ecx
push ebp
mov ebp, dword [esp + 0x2a0]
cmp eax, 0x18
ja 0x40c446
push ebx
push esi
push edi
xor edi, edi
lea ebx, [edx + 0x4b4]
jmp 0x40c1e0
cmp dword [ebx + 0x134], eax
lea esi, [ebx + 0x102]
jne 0x40c267
push ecx
mov ecx, ebx
call fcn.004205f0
test al, al
je 0x40c25c
mov ecx, dword [esp + 0x18]
mov edx, 0xc
mov eax, dword [esi]
cmp eax, dword [ecx]
jne 0x40c25c
add esi, 4
add ecx, 4
sub edx, 4
jae 0x40c203
push 0
push 0
push 0x20
lea eax, [esp + 0x54]
mov ecx, 8
lea esi, [ebx + 0x112]
lea edi, [esp + 0x54]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.00420790
lea esi, [ebx + 0x138]
mov ecx, 8
lea edi, [esp + 0x28]
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 0x40c386
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x2a4]
inc edi
add ebx, 0x178
cmp edi, 4
jb 0x40c1e0
push 0x200
lea eax, [esp + 0x8c]
push eax
push dword [esp + 0x28]
call fcn.00425020
lea edx, [esp + 0x88]
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x40c297
mov edi, dword [esp + 0x2a4]
sub edx, ecx
mov ebx, dword [esp + 0x18]
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.0040c7a0
push 0x200
lea eax, [esp + 0x8c]
push eax
call fcn.00420960
mov esi, dword [esp + 0x1c]
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 + 0x1c]
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 + 0x54]
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 + 0x34]
rep movsd dword es:[edi], dword [esi]
lea edi, [edx + 0x158]
mov ecx, 8
lea esi, [esp + 0x74]
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.00420790
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40c39b
mov ecx, 8
lea esi, [esp + 0x68]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
test ebp, ebp
je 0x40c40e
xor eax, eax
lea ebx, [esp + 0x28]
mov dword [ebp], eax
xor edi, edi
mov dword [ebp + 4], eax
lea edx, [eax + 3]
lea esi, [eax + 1]
lea eax, [esp + 0x2a]
sub eax, edx
mov dword [esp + 0x14], eax
lea ecx, [ecx]
mov al, byte [ebx + esi - 1]
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 eax, dword [esp + 0x14]
and ecx, 7
mov al, byte [eax + edx]
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 0x40c3c0
push 0x20
lea eax, [esp + 0x2c]
push eax
call fcn.00420960
mov eax, dword [esp + 0x24]
pop edi
pop esi
pop ebx
test eax, eax
je 0x40c43a
mov ecx, dword [esp + 0x10]
push eax
push pe_nt_image_headers32
lea eax, [esp + 0x44]
add ecx, 0xa9c
push eax
push dword [esp + 0x290]
call fcn.0041dbd0
push 0x20
lea eax, [esp + 0x40]
push eax
call fcn.00420960
mov ecx, dword [esp + 0x27c]
pop ebp
xor ecx, esp
call fcn.0042f943
add esp, 0x27c
ret 0x20