Function at 0x40c5f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
push edi
mov ecx, ebx
mov dword [ebp - 8], esi
mov dword [ebp - 0x10], 0
call fcn.005de2f0
test al, al
je 0x40ceae
mov ecx, ebx
call fcn.005de430
sub eax, 0x3056
je 0x40c639
dec eax
jne 0x40ce98
push ebx
mov ecx, esi
call fcn.006d1850
jmp 0x40ce98
mov ecx, ebx
call fcn.005de470
test al, al
je 0x40ce98
mov ecx, ebx
call fcn.005de4f0
dec eax
cmp eax, 8
ja case.0x40c659.3
jmp dword [eax*4 + 0x40ced0]
add esi, 0x75c
push 4
push esi
jmp 0x40ce78
mov ecx, ebx
add esi, 0x758
call fcn.005de500
inc eax
mov ecx, esi
shr eax, 1
push eax
call fcn.005dd910
mov esi, dword [esi]
mov ecx, ebx
call fcn.005de500
push eax
push esi
jmp 0x40ce78
mov eax, 4
call fcn.0078c8d0
mov edi, esp
push 4
push edi
mov ecx, ebx
call fcn.005de5b0
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x764]
cmp eax, 0xffffffff
je case.0x40c659.3
push eax
call fcn.0045c0b0
add esp, 4
test eax, eax
je case.0x40c659.3
mov ecx, dword [0x829478]
push 1
lea esi, [eax + 0x14]
push ecx
push 4
push esi
call fcn.0045cc80
push 1
push 4
push edi
push esi
call fcn.0045cb20
push 0
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 0x24
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb case.0x40c659.3
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], 0
sub edx, ecx
cmp edx, eax
jne 0x40c741
inc dword [0x8294f0]
call fcn.0045dca0
mov ecx, dword [0x829478]
mov eax, dword [0x820dd0]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x40c754
inc dword [0x8294f0]
call fcn.0045dca0
mov al, byte [0x81c644]
test al, al
jne 0x40c76e
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 0x40c782
sub eax, ecx
jmp 0x40c78a
mov ecx, dword [0x83f454]
add eax, ecx
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x40c7aa
mov edx, ecx
or edx, eax
je 0x40c7aa
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe case.0x40c659.3
mov cl, byte [0x81c6fc]
test cl, cl
jne case.0x40c659.3
mov ecx, dword [0x8294e8]
mov dword [0x829468], eax
mov eax, dword [0x829478]
mov byte [0x81c6fc], 1
test ecx, ecx
not eax
jle 0x40c831
mov dword [ebp - 4], 0x820e44
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx]
test ecx, ecx
je 0x40c81c
mov esi, dword [ecx + 4]
test esi, esi
jle 0x40c81c
mov edx, dword [ecx]
mov edi, dword [edx + 0xc]
sar edi, 2
test edx, edx
je 0x40c81c
test esi, esi
jle 0x40c81c
mov ebx, esi
mov ecx, dword [edx]
xor eax, ecx
lea ecx, [edx + 0x14]
test edi, edi
jle 0x40c816
mov esi, edi
xor eax, dword [ecx]
add ecx, 4
dec esi
jne 0x40c80e
mov edx, dword [edx + 4]
dec ebx
jne 0x40c801
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
add edx, 4
dec ecx
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], ecx
jne 0x40c7df
mov ebx, dword [ebp + 8]
cmp eax, dword [0x8294d8]
je 0x40c844
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294e8]
xor esi, esi
cmp eax, esi
je 0x40c908
mov eax, dword [0x829464]
mov dword [ebp - 4], esi
cmp eax, esi
je 0x40c8d1
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, esi
je 0x40c8c6
mov edx, dword [0x829488]
push esi
add eax, 0x14
push 4
push eax
lea eax, [edx*4 + 0x82948c]
push eax
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea ecx, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [ebp - 4], ecx
mov dword [0x829488], eax
jl 0x40c8a9
mov dword [0x829488], esi
push esi
call fcn.0045d120
add esp, 4
call fcn.004059e0
mov eax, dword [ebp - 4]
cmp eax, esi
je 0x40c8c6
cmp dword [eax], 0x29874362
je 0x40c8d1
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294b0]
mov dword [ebp - 4], esi
cmp eax, esi
je 0x40c908
lea edx, [ebp - 4]
push edx
push eax
call fcn.00407b70
add esp, 8
test al, al
je 0x40c8fd
mov eax, dword [ebp - 4]
cmp eax, esi
je 0x40c8fd
cmp dword [eax], 0xbad0bad
je 0x40c908
inc dword [0x8294f0]
call fcn.0045dca0
mov byte [0x81c6fc], 0
jmp case.0x40c659.3
mov eax, 4
call fcn.0078c8d0
mov edi, esp
push 4
push edi
mov ecx, ebx
call fcn.005de5b0
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x768]
cmp eax, 0xffffffff
je case.0x40c659.3
push eax
call fcn.0045c0b0
add esp, 4
test eax, eax
je case.0x40c659.3
mov ecx, dword [0x829478]
push 1
lea esi, [eax + 0x14]
push ecx
push 4
push esi
call fcn.0045cc80
push 1
push 4
push edi
push esi
call fcn.0045cb20
push 0
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 0x24
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb case.0x40c659.3
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], 0
sub edx, ecx
cmp edx, eax
jne 0x40c9bf
inc dword [0x8294f0]
call fcn.0045dca0
mov ecx, dword [0x829478]
mov eax, dword [0x820dd0]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x40c9d2
inc dword [0x8294f0]
call fcn.0045dca0
mov al, byte [0x81c644]
test al, al
jne 0x40c9ec
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 0x40ca00
sub eax, ecx
jmp 0x40ca08
mov ecx, dword [0x83f454]
add eax, ecx
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x40ca28
mov edx, eax
or edx, ecx
je 0x40ca28
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe case.0x40c659.3
mov cl, byte [0x81c6fc]
test cl, cl
jne case.0x40c659.3
mov ecx, dword [0x8294e8]
mov dword [0x829468], eax
mov eax, dword [0x829478]
mov byte [0x81c6fc], 1
test ecx, ecx
not eax
jle 0x40caac
mov dword [ebp - 4], 0x820e44
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx]
test ecx, ecx
je 0x40ca9a
mov esi, dword [ecx + 4]
test esi, esi
jle 0x40ca9a
mov edx, dword [ecx]
mov edi, dword [edx + 0xc]
sar edi, 2
test edx, edx
je 0x40ca9a
test esi, esi
jle 0x40ca9a
mov ebx, esi
mov ecx, dword [edx]
xor eax, ecx
lea ecx, [edx + 0x14]
test edi, edi
jle 0x40ca94
mov esi, edi
xor eax, dword [ecx]
add ecx, 4
dec esi
jne 0x40ca8c
mov edx, dword [edx + 4]
dec ebx
jne 0x40ca7f
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
add edx, 4
dec ecx
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], ecx
jne 0x40ca5d
cmp eax, dword [0x8294d8]
je 0x40cabf
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294e8]
xor edi, edi
cmp eax, edi
je 0x40ce66
mov eax, dword [0x829464]
cmp eax, edi
je 0x40cb43
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, edi
je 0x40cb38
mov edx, dword [0x829488]
push edi
add eax, 0x14
push 4
push eax
lea eax, [edx*4 + 0x82948c]
push eax
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea esi, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [0x829488], eax
jl 0x40cb1e
mov dword [0x829488], edi
push edi
call fcn.0045d120
add esp, 4
call fcn.004059e0
cmp esi, edi
je 0x40cb38
cmp dword [esi], 0x29874362
je 0x40cb43
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294b0]
cmp eax, edi
je 0x40ce66
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, edi
je 0x40ce5b
mov ecx, dword [0x829488]
push edi
add eax, 0x14
push 4
lea edx, [ecx*4 + 0x82948c]
push eax
push edx
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea esi, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [0x829488], eax
jl 0x40cb9b
mov dword [0x829488], edi
push edi
call fcn.0045d120
add esp, 4
call fcn.004059e0
cmp esi, edi
je 0x40ce5b
cmp dword [esi], 0xbad0bad
je 0x40ce66
jmp 0x40ce5b
mov eax, 4
call fcn.0078c8d0
mov edi, esp
push 4
push edi
mov ecx, ebx
call fcn.005de5b0
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x76c]
cmp eax, 0xffffffff
je case.0x40c659.3
push eax
call fcn.0045c0b0
add esp, 4
test eax, eax
je case.0x40c659.3
mov ecx, dword [0x829478]
push 1
lea esi, [eax + 0x14]
push ecx
push 4
push esi
call fcn.0045cc80
push 1
push 4
push edi
push esi
call fcn.0045cb20
push 0
call fcn.0045d120
mov eax, dword [0x81c700]
add esp, 0x24
inc eax
cmp eax, 0x186a0
mov dword [0x81c700], eax
jb case.0x40c659.3
mov eax, dword [0x820dd0]
mov ecx, dword [0x829478]
mov edx, eax
mov dword [0x81c700], 0
sub edx, ecx
cmp edx, eax
jne 0x40cc6d
inc dword [0x8294f0]
call fcn.0045dca0
mov ecx, dword [0x829478]
mov eax, dword [0x820dd0]
mov edx, ecx
sub edx, eax
cmp edx, ecx
jne 0x40cc80
inc dword [0x8294f0]
call fcn.0045dca0
mov al, byte [0x81c644]
test al, al
jne 0x40cc9a
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 0x40ccae
sub eax, ecx
jmp 0x40ccb6
mov ecx, dword [0x83f454]
add eax, ecx
mov ecx, dword [0x829468]
cmp eax, ecx
jb 0x40ccd6
mov edx, eax
or edx, ecx
je 0x40ccd6
mov edx, eax
sub edx, ecx
cmp edx, 0x3a98
jbe case.0x40c659.3
mov cl, byte [0x81c6fc]
test cl, cl
jne case.0x40c659.3
mov ecx, dword [0x8294e8]
mov dword [0x829468], eax
mov eax, dword [0x829478]
mov byte [0x81c6fc], 1
test ecx, ecx
not eax
jle 0x40cd5a
mov dword [ebp - 4], 0x820e44
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx]
test ecx, ecx
je 0x40cd48
mov esi, dword [ecx + 4]
test esi, esi
jle 0x40cd48
mov edx, dword [ecx]
mov edi, dword [edx + 0xc]
sar edi, 2
test edx, edx
je 0x40cd48
test esi, esi
jle 0x40cd48
mov ebx, esi
mov ecx, dword [edx]
xor eax, ecx
lea ecx, [edx + 0x14]
test edi, edi
jle 0x40cd42
mov esi, edi
xor eax, dword [ecx]
add ecx, 4
dec esi
jne 0x40cd3a
mov edx, dword [edx + 4]
dec ebx
jne 0x40cd2d
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
add edx, 4
dec ecx
mov dword [ebp - 4], edx
mov dword [ebp - 0xc], ecx
jne 0x40cd0b
cmp eax, dword [0x8294d8]
je 0x40cd6d
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294e8]
xor edi, edi
cmp eax, edi
je 0x40ce66
mov eax, dword [0x829464]
cmp eax, edi
je 0x40cdf1
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, edi
je 0x40cde6
mov edx, dword [0x829488]
push edi
add eax, 0x14
push 4
push eax
lea eax, [edx*4 + 0x82948c]
push eax
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea esi, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [0x829488], eax
jl 0x40cdcc
mov dword [0x829488], edi
push edi
call fcn.0045d120
add esp, 4
call fcn.004059e0
cmp esi, edi
je 0x40cde6
cmp dword [esi], 0x29874362
je 0x40cdf1
inc dword [0x8294f0]
call fcn.0045dca0
mov eax, dword [0x8294b0]
cmp eax, edi
je 0x40ce66
push eax
call fcn.0045c0b0
add esp, 4
cmp eax, edi
je 0x40ce5b
mov ecx, dword [0x829488]
push edi
add eax, 0x14
push 4
lea edx, [ecx*4 + 0x82948c]
push eax
push edx
call fcn.0045cba0
mov eax, dword [0x829488]
add esp, 0x10
lea esi, [eax*4 + 0x82948c]
inc eax
cmp eax, 8
mov dword [0x829488], eax
jl 0x40ce41
mov dword [0x829488], edi
push edi
call fcn.0045d120
add esp, 4
call fcn.004059e0
cmp esi, edi
je 0x40ce5b
cmp dword [esi], 0xbad0bad
je 0x40ce66
inc dword [0x8294f0]
call fcn.0045dca0
mov ebx, dword [ebp + 8]
mov byte [0x81c6fc], 0
jmp case.0x40c659.3
lea eax, [ebp - 0x10]
push 4
push eax
mov ecx, ebx
call fcn.005de5b0
mov ecx, ebx
call fcn.005de4a0
mov ecx, ebx
call fcn.005de470
mov esi, dword [ebp - 8]
test al, al
jne 0x40c648
mov ecx, ebx
call fcn.005de3e0
mov ecx, ebx
call fcn.005de2f0
test al, al
jne 0x40c617
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40cebf
push esi
push eax
call fcn.00525d20
add esp, 8
lea esp, [ebp - 0x1c]
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4