Function at 0x40de29
Capabilities:
Encode data using xor

Disassembly:
push 0x668
mov eax, 0x4e5680
call fcn.004bed19
xor esi, esi
cmp dword [ebp + 8], esi
jge 0x40de42
mov dword [ebp + 8], esi
mov ebx, 0x200
push ebx
lea eax, [ebp - 0x640]
push esi
push eax
call fcn.004be850
add esp, 0xc
push 0xa
lea eax, [ebp - 0x640]
push eax
push dword [ebp + 8]
call fcn.004baaf5
add esp, 0xc
lea eax, [ebp - 0x640]
push eax
lea ecx, [ebp - 0x658]
call fcn.004024df
mov edi, 0x584840
mov dword [ebp - 4], esi
push edi
mov dword [ebp - 0x674], edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 4], 1
call fcn.00499991
push eax
lea ecx, [ebp - 0x654]
call fcn.004727f7
push esi
lea eax, [ebp - 0x654]
push 0x526688
push eax
mov byte [ebp - 4], 2
call fcn.00402967
mov esi, dword [ebp - 0x658]
add esp, 0xc
push dword [ebp - 0x654]
mov ecx, 0x584a68
call fcn.004a7d87
push esi
mov ecx, eax
call fcn.004026bd
mov eax, dword [ebp - 0x658]
mov dword [ebp - 0x644], eax
lea eax, [ebp - 0x64c]
push eax
lea esi, [ebp - 0x670]
mov dword [ebp - 0x64c], SysReAllocString
call fcn.0040a64a
mov byte [ebp - 4], 3
call fcn.00499991
push eax
lea ecx, [ebp - 0x650]
call fcn.004727f7
push 0
mov byte [ebp - 4], 4
push dword [0x584a4c]
lea eax, [ebp - 0x650]
push dword [0x584a54]
push eax
call fcn.00402967
add esp, 0x10
call fcn.00499991
push eax
lea ecx, [ebp - 0x64c]
call fcn.004727f7
push ebx
lea eax, [ebp - 0x440]
push 0
mov byte [ebp - 4], 5
push eax
mov dword [ebp - 0x670], 0x2001f
call fcn.004be850
add esp, 0xc
mov ebx, 0xff
push ebx
push dword [ebp - 0x644]
lea eax, [ebp - 0x440]
push eax
call fcn.004ba74e
mov eax, dword [0x584a64]
add esp, 0xc
cmp dword [eax - 0xc], 0
jne 0x40dfc8
mov ecx, dword [ebp - 0x64c]
add ecx, 0xfffffff0
call fcn.004027b0
mov ecx, dword [ebp - 0x650]
add ecx, 0xfffffff0
call fcn.004027b0
call fcn.0040a6c4
mov ecx, dword [ebp - 0x668]
add ecx, 0xfffffff0
call fcn.004027b0
jmp 0x40e21b
push 7
pop ecx
mov esi, str.Microsoft_Visual_C_Library
lea edi, [ebp - 0x30]
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
mov esi, 0x101
push esi
lea eax, [ebp - 0x138]
push 0
push eax
call fcn.004be850
add esp, 0xc
push esi
lea eax, [ebp - 0x240]
push 0
push eax
call fcn.004be850
add esp, 0xc
xor eax, eax
lea edi, [esi - 1]
mov byte [ebp + eax - 0x138], al
inc eax
cmp eax, edi
jb 0x40e004
mov ecx, dword [0x584a64]
mov ecx, dword [ecx - 0xc]
xor eax, eax
xor esi, esi
test ecx, ecx
je 0x40e03f
cmp eax, ecx
jb 0x40e027
xor eax, eax
mov edx, dword [0x584a64]
mov dl, byte [edx + eax*2]
inc eax
mov byte [ebp + esi - 0x240], dl
inc esi
cmp esi, edi
jb 0x40e021
jmp 0x40e057
cmp eax, 0x1c
jb 0x40e046
xor eax, eax
mov cl, byte [ebp + eax - 0x30]
inc eax
mov byte [ebp + esi - 0x240], cl
inc esi
cmp esi, edi
jb 0x40e03f
xor edi, edi
mov dword [ebp - 0x648], edi
movzx edx, byte [ebp + edi - 0x240]
add edx, dword [ebp - 0x648]
lea eax, [ebp + edi - 0x138]
mov cl, byte [eax]
movzx esi, cl
add esi, edx
and esi, ebx
mov edx, esi
movzx cx, cl
lea esi, [ebp + edx - 0x138]
mov dword [ebp - 0x648], edx
mov dl, byte [esi]
movzx ecx, cx
inc edi
mov byte [eax], dl
mov byte [esi], cl
cmp edi, 0x100
jb 0x40e05f
xor edi, edi
mov dword [ebp - 0x648], edi
mov dword [ebp - 0x644], edi
inc edi
and edi, ebx
lea eax, [ebp + edi - 0x138]
mov cl, byte [eax]
movzx edx, cl
add edx, dword [ebp - 0x648]
movzx cx, cl
and edx, ebx
movzx ecx, cx
lea esi, [ebp + edx - 0x138]
mov dword [ebp - 0x648], edx
mov dl, byte [esi]
mov byte [eax], dl
mov byte [esi], cl
movzx eax, byte [eax]
movzx ecx, cl
add eax, ecx
mov ecx, dword [ebp - 0x644]
and eax, ebx
movzx ax, byte [ebp + eax - 0x138]
movzx eax, ax
lea ecx, [ebp + ecx - 0x440]
xor byte [ecx], al
inc dword [ebp - 0x644]
cmp dword [ebp - 0x644], 0x1fe
jb 0x40e0b0
xor eax, eax
mov word [ebp - 0x242], ax
call fcn.00499991
push eax
lea ecx, [ebp - 0x644]
call fcn.004727f7
push 0
mov byte [ebp - 4], 6
push dword [0x584a5c]
lea eax, [ebp - 0x644]
push eax
call fcn.00402967
add esp, 8
lea eax, [ebp - 0x644]
mov dword [ebp - 0x648], esp
mov ecx, esp
push eax
lea esi, [ebp - 0x440]
call fcn.0040228a
mov ecx, esi
call fcn.0040b6c1
pop ecx
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x644]
add ecx, 0xfffffff0
call fcn.004027b0
mov edi, dword [ebp - 0x650]
push 1
push edi
push SysReAllocString
lea esi, [ebp - 0x670]
call fcn.0040a666
mov ebx, dword [ebp - 0x64c]
test eax, eax
je 0x40e1bd
push 0x200
lea eax, [ebp - 0x440]
push eax
push ebx
mov eax, esi
call fcn.0040a8f8
call fcn.0040a6c4
push 1
push edi
push reloc.OLEAUT32.dll_SysReAllocString
lea esi, [ebp - 0x670]
call fcn.0040a666
test eax, eax
je 0x40e1ed
push 0x200
lea eax, [ebp - 0x440]
push eax
push ebx
mov eax, esi
call fcn.0040a8f8
call fcn.0040a6c4
lea ecx, [ebx - 0x10]
call fcn.004027b0
lea ecx, [edi - 0x10]
call fcn.004027b0
lea esi, [ebp - 0x670]
call fcn.0040a6c4
mov ecx, dword [ebp - 0x668]
add ecx, 0xfffffff0
call fcn.004027b0
mov edi, 0x584840
mov ecx, dword [ebp - 0x654]
add ecx, 0xfffffff0
call fcn.004027b0
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x658]
add ecx, 0xfffffff0
call fcn.004027b0
call fcn.004bed9c
ret 4