Function at 0x40a674
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffbf0
mov eax, dword [0x46b1bc]
push ebx
push esi
push edi
mov esi, dword [ebp + 8]
push 0
push eax
push esi
call fcn.0042e350
add esp, 0xc
push esi
push pe_nt_image_headers32
push 1
lea edx, [ebp - 0x410]
push edx
call fcn.0042e2b0
add esp, 0x10
xor ecx, ecx
mov dword [ebp - 4], ecx
mov ebx, ecx
lea eax, [ebp + ebx - 0x410]
cmp ebx, 0x200
jae 0x40a6f4
add ebx, 4
add eax, 4
cmp byte [eax], 0xff
jne 0x40a6e4
cmp byte [eax + 1], 0x15
jne 0x40a6ea
lea eax, [ebx + 2]
lea edx, [ebp - 0x410]
add eax, edx
mov ecx, dword [eax]
mov dword [ebp - 4], ecx
jmp 0x40a6f4
sub ebx, 4
add eax, 0xfffffffc
inc ebx
inc eax
cmp ebx, 0x200
jb 0x40a6c1
cmp ebx, 0x200
je 0x40a702
cmp dword [ebp - 4], 0
jne 0x40a709
xor eax, eax
jmp 0x40aa6e
mov edx, dword [0x46b0f0]
xor ebx, ebx
sub dword [ebp - 4], edx
mov eax, dword [0x46b1b4]
add eax, 0xc
jmp 0x40a739
mov edx, dword [eax]
cmp edx, dword [ebp - 4]
ja 0x40a735
mov ecx, edx
add ecx, dword [eax - 4]
cmp ecx, dword [ebp - 4]
jbe 0x40a735
sub edx, dword [eax + 8]
sub dword [ebp - 4], edx
inc ebx
add eax, 0x28
movzx edx, word [0x46b0c2]
cmp ebx, edx
jb 0x40a71e
mov eax, dword [ebp - 4]
push 0
push eax
push esi
mov dword [0x46b1c4], eax
call fcn.0042e350
add esp, 0xc
push esi
push 4
push 1
lea ecx, [ebp - 4]
push ecx
call fcn.0042e2b0
add esp, 0x10
mov eax, dword [0x46b0f0]
sub dword [ebp - 4], eax
xor ebx, ebx
mov eax, dword [0x46b1b4]
add eax, 0xc
jmp 0x40a798
mov edx, dword [eax]
cmp edx, dword [ebp - 4]
ja 0x40a794
mov ecx, edx
add ecx, dword [eax - 4]
cmp ecx, dword [ebp - 4]
jbe 0x40a794
sub edx, dword [eax + 8]
sub dword [ebp - 4], edx
inc ebx
add eax, 0x28
movzx edx, word [0x46b0c2]
cmp ebx, edx
jb 0x40a77d
push 0
mov eax, dword [ebp - 4]
push eax
push esi
call fcn.0042e350
add esp, 0xc
push esi
push 0x100
push 1
lea ecx, [ebp - 0x410]
push ecx
call fcn.0042e2b0
add esp, 0x10
xor ebx, ebx
lea eax, [ebp - 0x410]
cmp byte [eax], 0xe8
jne 0x40a7ee
cmp byte [eax + 1], 0x2c
jne 0x40a7ee
cmp byte [eax + 2], 0x61
jne 0x40a7ee
cmp byte [eax + 3], 0
jne 0x40a7ee
cmp byte [eax + 4], 0
je 0x40a7f8
inc ebx
inc eax
cmp ebx, 0x100
jb 0x40a7d1
cmp ebx, 0x100
jne 0x40a807
xor eax, eax
jmp 0x40aa6e
xor edx, edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 0xc], edx
push 0
mov eax, dword [ebp - 4]
add eax, ebx
add eax, 5
push eax
push esi
call fcn.0042e350
add esp, 0xc
push esi
push 4
push 1
lea ecx, [ebp - 0xc]
push ecx
call fcn.0042e2b0
add esp, 0x10
push esi
push 4
push 1
lea eax, [ebp - 0x10]
push eax
call fcn.0042e2b0
xor dword [ebp - 0xc], 0xe8310f
xor dword [ebp - 0x10], 0xfc000000
mov edx, dword [ebp - 0xc]
add esp, 0x10
sub dword [ebp - 0x10], edx
lea eax, [ebp - 8]
mov edi, dword [ebp - 0xc]
add edi, dword [ebp - 0x10]
add edi, dword [ebp - 0x10]
push esi
push 4
push 1
push eax
call fcn.0042e2b0
add esp, 0x10
xor dword [ebp - 8], edi
cmp dword [ebp - 8], 0x81e88b58
je 0x40a886
xor eax, eax
jmp 0x40aa6e
add edi, dword [ebp - 0x10]
push esi
push 4
push 1
lea edx, [ebp - 8]
push edx
call fcn.0042e2b0
add esp, 0x10
xor dword [ebp - 8], edi
cmp dword [ebp - 8], 0x401007ed
je 0x40a8ad
xor eax, eax
jmp 0x40aa6e
push 1
push esi
push 0x209
call fcn.00401410
add esp, 0xc
dec eax
je 0x40a8c7
xor eax, eax
jmp 0x40aa6e
xor edx, edx
mov ecx, dword [0x46b1c4]
mov dword [ebp - 8], edx
push 0
push ecx
push esi
call fcn.0042e350
add esp, 0xc
push esi
push 4
push 1
lea eax, [ebp - 8]
push eax
call fcn.0042e540
add esp, 0x10
mov edx, dword [ebp - 4]
mov dword [0x46b1c4], edx
add ebx, 5
add dword [ebp - 4], ebx
xor ebx, ebx
mov eax, dword [ebp - 0x10]
add dword [ebp - 0xc], eax
inc ebx
cmp ebx, 0x1522
jb 0x40a900
push 0
mov edx, dword [ebp - 4]
add edx, 0x5488
push edx
push esi
call fcn.0042e350
add esp, 0xc
xor ebx, ebx
lea edi, [ebp - 0x210]
push esi
push 4
push 1
mov eax, ebx
shl eax, 2
lea edx, [ebp - 0x210]
add eax, edx
push eax
call fcn.0042e2b0
mov ecx, dword [ebp - 0xc]
add esp, 0x10
xor dword [edi], ecx
add edi, 4
mov eax, dword [ebp - 0x10]
inc ebx
add dword [ebp - 0xc], eax
cmp ebx, 0x80
jb 0x40a92c
push 0
mov edx, dword [0x46b1bc]
push edx
push esi
call fcn.0042e350
add esp, 0xc
push esi
push pe_nt_image_headers32
push 1
lea ecx, [ebp - 0x210]
push ecx
call fcn.0042e540
movzx ebx, word [0x46b0c2]
dec ebx
mov edx, dword [0x46b1b4]
add esp, 0x10
lea eax, [ebx + ebx*4]
mov ecx, dword [edx + eax*8 + 0x14]
cmp ecx, dword [0x46b1c4]
jae 0x40a9d2
lea ecx, [ebx + ebx*4]
mov edi, dword [0x46b1b4]
push dword [edi + ecx*8 + 0x14]
mov ecx, dword [0x46b1c4]
pop edi
sub ecx, edi
push ecx
pop ecx
mov dword [edx + eax*8 + 0x10], ecx
lea ecx, [ebx + ebx*4]
mov edi, dword [0x46b1b4]
push dword [edi + ecx*8 + 0x10]
pop ecx
mov dword [edx + eax*8 + 8], ecx
mov edx, dword [0x46b1b4]
mov ecx, dword [0x46b0f4]
mov edi, dword [edx + eax*8 + 0xc]
mov edx, dword [0x46b1b4]
add edi, dword [edx + eax*8 + 8]
xor edx, edx
dec edi
mov eax, edi
div ecx
inc eax
imul ecx
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
push 0
mov dword [0x46b10c], eax
mov ecx, dword [0x46b1b8]
push ecx
push esi
call fcn.0042e350
add esp, 0xc
push esi
push 0xf8
push 1
push 0x46b0bc
call fcn.0042e540
add esp, 0x10
mov eax, dword [0x46b1c0]
push 0
push eax
push esi
call fcn.0042e350
movzx edx, word [0x46b0c2]
mov ecx, edx
add esp, 0xc
shl ecx, 3
mov eax, dword [0x46b1b4]
push esi
lea ecx, [ecx + ecx*4]
push ecx
push 1
push eax
call fcn.0042e540
add esp, 0x10
push esi
call fcn.00418690
pop ecx
inc eax
jne 0x40aa69
or eax, 0xffffffff
jmp 0x40aa6e
mov eax, 0x209
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret