Function at 0x40e530
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [ecx + 0x76c]
sub esp, 8
cmp eax, 0xffffffff
push ebp
push esi
je 0x40e7b9
push eax
call fcn.0045c0b0
xor ebp, ebp
add esp, 4
cmp eax, ebp
je 0x40e7bb
push ebp
add eax, 0x14
push 4
push eax
mov eax, dword [0x829488]
lea ecx, [eax*4 + 0x82948c]
push ecx
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea esi, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [esp + 0xc], esi
mov dword [0x829488], eax
jl 0x40e594
mov dword [0x829488], ebp
push ebp
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 4
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb 0x40e7b1
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], ebp
sub edx, ecx
cmp edx, eax
jne 0x40e5e2
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x40e5f5
inc dword [0x8294f0]
call fcn.0045dca0
mov al, byte [0x81c644]
test al, al
jne 0x40e60f
mov ecx, 0x83f450
call fcn.005ddd50
mov byte [0x81c644], 1
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x83f450]
cmp eax, ecx
jbe 0x40e623
sub eax, ecx
jmp 0x40e62b
mov ecx, dword [0x83f454]
add eax, ecx
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x40e64b
mov edx, ecx
or edx, eax
je 0x40e64b
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe 0x40e7b1
mov cl, byte [0x81c6fc]
test cl, cl
jne 0x40e7b1
mov ecx, dword [0x8294e8]
mov dword [0x829468], eax
mov eax, dword [0x829478]
cmp ecx, ebp
mov byte [0x81c6fc], 1
not eax
jle 0x40e6d1
push ebx
push edi
mov ebx, 0x820e44
mov dword [esp + 0x10], ecx
mov ecx, dword [ebx]
cmp ecx, ebp
je 0x40e6bd
mov esi, dword [ecx + 4]
cmp esi, ebp
jle 0x40e6bd
mov edx, dword [ecx]
mov edi, dword [edx + 0xc]
sar edi, 2
cmp edx, ebp
je 0x40e6bd
cmp esi, ebp
jle 0x40e6bd
mov ebp, esi
mov ecx, dword [edx]
xor eax, ecx
lea ecx, [edx + 0x14]
test edi, edi
jle 0x40e6b5
mov esi, edi
xor eax, dword [ecx]
add ecx, 4
dec esi
jne 0x40e6ad
mov edx, dword [edx + 4]
dec ebp
jne 0x40e6a0
xor ebp, ebp
mov ecx, dword [esp + 0x10]
add ebx, 4
dec ecx
mov dword [esp + 0x10], ecx
jne 0x40e681
mov esi, dword [esp + 0x14]
pop edi
pop ebx
cmp eax, dword [0x8294d8]
je 0x40e6e4
inc dword [0x8294f0]
call fcn.0045dca0
cmp dword [0x8294e8], ebp
je 0x40e7aa
mov eax, dword [0x829464]
mov dword [esp + 8], ebp
cmp eax, ebp
je 0x40e770
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, ebp
je 0x40e765
push ebp
add eax, 0x14
push 4
push eax
mov eax, dword [0x829488]
lea ecx, [eax*4 + 0x82948c]
push ecx
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea edx, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [esp + 8], edx
mov dword [0x829488], eax
jl 0x40e747
mov dword [0x829488], ebp
push ebp
call fcn.0045d120
add esp, 4
call fcn.004059e0
mov eax, dword [esp + 8]
cmp eax, ebp
je 0x40e765
cmp dword [eax], 0x29874362
je 0x40e770
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294b0]
mov dword [esp + 8], ebp
cmp eax, ebp
je 0x40e7aa
lea ecx, [esp + 8]
push ecx
push eax
call fcn.00407b70
add esp, 8
test al, al
je 0x40e79f
mov eax, dword [esp + 8]
cmp eax, ebp
je 0x40e79f
cmp dword [eax], 0xbad0bad
je 0x40e7aa
inc dword [0x8294f0]
call fcn.0045dca0
mov byte [0x81c6fc], 0
cmp esi, ebp
je 0x40e7bb
mov eax, esi
jmp 0x40e7c0
xor ebp, ebp
mov eax, 0x89fe30
mov eax, dword [eax]
add eax, 2
cmp eax, 3
ja case.0x40e7ca.2
jmp dword [eax*4 + 0x40e850]
fld dword [0x81c768]
mov eax, dword [esp + 0x14]
pop esi
pop ebp
fstp dword [eax]
mov edx, dword [0x81c76c]
mov dword [eax + 4], edx
mov ecx, dword [0x81c770]
mov dword [eax + 8], ecx
add esp, 8
ret 4
mov esi, dword [esp + 0x14]
push ebp
push esi
call fcn.006d99e0
add esp, 8
mov eax, esi
pop esi
pop ebp
add esp, 8
ret 4
mov esi, dword [esp + 0x14]
push 1
push esi
call fcn.006d99e0
add esp, 8
mov eax, esi
pop esi
pop ebp
add esp, 8
ret 4
fld dword [0x81c788]
mov eax, dword [esp + 0x14]
pop esi
pop ebp
fstp dword [eax]
mov edx, dword [0x81c78c]
mov dword [eax + 4], edx
mov ecx, dword [0x81c790]
mov dword [eax + 8], ecx
add esp, 8
ret 4